You are here

public function ModerationStateTransitionListBuilder::render in Workbench Moderation 8.2

Same name and namespace in other branches
  1. 8 src/ModerationStateTransitionListBuilder.php \Drupal\workbench_moderation\ModerationStateTransitionListBuilder::render()

Builds the entity listing as renderable array for table.html.twig.

@todo Add a link to add a new item to the #empty text.

Overrides DraggableListBuilder::render

File

src/ModerationStateTransitionListBuilder.php, line 79

Class

ModerationStateTransitionListBuilder
Provides a listing of Moderation state transition entities.

Namespace

Drupal\workbench_moderation

Code

public function render() {
  $build = parent::render();

  // TODO: Change the autogenerated stub
  $build['item'] = [
    '#type' => 'item',
    '#markup' => $this
      ->t('When saving an entity, only a destination state that has a transition is legal. That includes its current state. If you want to allow an entity to be saved without changing its state then you must define a transition from that state to itself. Note that all users will still need permission to use a defined transition.'),
    '#weight' => -5,
  ];
  return $build;
}