public function ModerationStateTransitionListBuilder::buildRow in Workbench Moderation 8
Same name and namespace in other branches
- 8.2 src/ModerationStateTransitionListBuilder.php \Drupal\workbench_moderation\ModerationStateTransitionListBuilder::buildRow()
Builds a row for an entity in the entity listing.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list.
Return value
array A render array structure of fields for this entity.
Overrides DraggableListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- src/
ModerationStateTransitionListBuilder.php, line 70
Class
- ModerationStateTransitionListBuilder
- Provides a listing of Moderation state transition entities.
Namespace
Drupal\workbench_moderationCode
public function buildRow(EntityInterface $entity) {
/** @var ModerationStateTransitionInterface $entity */
$row['label'] = $entity
->label();
$row['id']['#markup'] = $entity
->id();
$row['from']['#markup'] = $this->stateStorage
->load($entity
->getFromState())
->label();
$row['to']['#markup'] = $this->stateStorage
->load($entity
->getToState())
->label();
return $row + parent::buildRow($entity);
}