hidden entries which are not published from entreesblock

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-09 12:57:23 +01:00
parent 0dbee83a2b
commit eb67107607
@@ -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
);