public function ActionListController::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 EntityListController::buildRow

See also

Drupal\Core\Entity\EntityListController::render()

File

drupal/core/modules/action/lib/Drupal/action/ActionListController.php, line 87
Contains \Drupal\action\ActionListController.

Class

ActionListController
Provides a listing of Actions.

Namespace

Drupal\action

Code

public function buildRow(EntityInterface $entity) {
  $row['type'] = $entity
    ->getType();
  $row['label'] = String::checkPlain($entity
    ->label());
  if ($this->hasConfigurableActions) {
    $row['operations']['data'] = $this
      ->buildOperations($entity);
  }
  return $row;
}