Browse Source

entree index now does not show documents masqués

Bachir Soussi Chiadmi 6 năm trước cách đây
mục cha
commit
12bfc68272
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      sites/all/modules/figli/edlp_corpus/edlp_corpus.module

+ 4 - 0
sites/all/modules/figli/edlp_corpus/edlp_corpus.module

@@ -68,6 +68,10 @@ function edlp_corpus_taxonomy_term_view(array &$build, EntityInterface $entity,
       '#items' => [],
     );
     foreach($documents as $doc){
+      // remove masqué
+      $sid = WorkflowManager::getCurrentStateId($doc, 'field_workflow');
+      if($sid != 'corpus_documents_publie') continue;
+      // TODO: instead of workflow, just check access
       $documents_list['#items'][] = $view_builder->view($doc, 'index');
     }