From eb6710760773b23a2d4604e184a4c242fce06552 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Fri, 9 Mar 2018 12:57:23 +0100 Subject: [PATCH] hidden entries which are not published from entreesblock --- .../figli/edlp_corpus/src/Plugin/Block/BlockEntrees.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sites/all/modules/figli/edlp_corpus/src/Plugin/Block/BlockEntrees.php b/sites/all/modules/figli/edlp_corpus/src/Plugin/Block/BlockEntrees.php index 5dc3209ca..37f775346 100644 --- a/sites/all/modules/figli/edlp_corpus/src/Plugin/Block/BlockEntrees.php +++ b/sites/all/modules/figli/edlp_corpus/src/Plugin/Block/BlockEntrees.php @@ -8,6 +8,7 @@ namespace Drupal\edlp_corpus\Plugin\Block; use Drupal\Core\Block\BlockBase; use Drupal\Core\Link; use Drupal\Core\Url; +use Drupal\workflow\Entity\WorkflowManager; /** * Creates a 'Entrees' Block @@ -34,6 +35,10 @@ class BlockEntrees extends BlockBase { $tid = $term->id(); $name = $term->getName(); + // remove masqué + $sid = WorkflowManager::getCurrentStateId($term, 'field_workflow'); + if($sid == 'generique_masque') continue; + $entree = array( 'tid'=>$tid );