/** * {@inheritdoc} */ public function render() { $entities = $this->load(); // If there are not multiple vocabularies, disable dragging by unsetting the // weight key. if (count($entities) <= 1) { unset($this->weightKey); } $build = parent::render(); $build['table']['#empty'] = t('No vocabularies available. <a href="@link">Add vocabulary</a>.', array('@link' => \Drupal::url('entity.taxonomy_vocabulary.add_form'))); return $build; }
/** * {@inheritdoc} */ public function render() { $build = parent::render(); $build['item'] = ['#type' => 'item', '#markup' => $this->t('On this screen you can define <em>transitions</em>. Every time an entity is saved, it undergoes a transition. It is not possible to save an entity if it tries do a transition not defined here. Transitions do not necessarily mean a state change, it is possible to transition from a state to the same state but that transition needs to be defined here as well.'), '#weight' => -5]; return $build; }