Prechádzať zdrojové kódy

entree index now does not show documents masqués

Bachir Soussi Chiadmi 6 rokov pred
rodič
commit
12bfc68272

+ 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');
     }