entree index now does not show documents masqués

This commit is contained in:
Bachir Soussi Chiadmi
2018-04-04 20:20:28 +02:00
parent c2e4eb9d38
commit 12bfc68272
@@ -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');
}