public ModerationStateTransitionListBuilder::buildRow(EntityInterface $entity)
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
- core/modules/content_moderation/src/ModerationStateTransitionListBuilder.php, line 83
Class
- ModerationStateTransitionListBuilder
- Provides a listing of Moderation state transition entities.
Namespace
Drupal\content_moderation
Code
public function buildRow(EntityInterface $entity) {
$row['to']['#markup'] = $this->stateStorage->load($entity->getToState())->label();
$row['label'] = $entity->label();
$row['roles']['#markup'] = implode(', ', user_role_names(FALSE, 'use ' . $entity->id() . ' transition'));
return $row + parent::buildRow($entity);
}
Please login to continue.