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

See also

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

5 calls to EntityListController::buildRow()
CustomBlockTypeListController::buildRow in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeListController.php
Overrides \Drupal\Core\Entity\EntityListController::buildRow().
EntityListController::render in drupal/core/lib/Drupal/Core/Entity/EntityListController.php
Implements \Drupal\Core\Entity\EntityListControllerInterface::render().
RoleListController::buildRow in drupal/core/modules/user/lib/Drupal/user/RoleListController.php
Builds a row for an entity in the entity listing.
VocabularyListController::buildRow in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyListController.php
Builds a row for an entity in the entity listing.
VocabularyListController::render in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyListController.php
Implements \Drupal\Core\Entity\EntityListControllerInterface::render().
8 methods override EntityListController::buildRow()
ActionListController::buildRow in drupal/core/modules/action/lib/Drupal/action/ActionListController.php
Builds a row for an entity in the entity listing.
CategoryListController::buildRow in drupal/core/modules/contact/lib/Drupal/contact/CategoryListController.php
Overrides Drupal\Core\Entity\EntityListController::buildRow().
CustomBlockTypeListController::buildRow in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeListController.php
Overrides \Drupal\Core\Entity\EntityListController::buildRow().
MenuListController::buildRow in drupal/core/modules/menu/lib/Drupal/menu/MenuListController.php
Overrides \Drupal\Core\Entity\EntityListController::buildRow().
RoleListController::buildRow in drupal/core/modules/user/lib/Drupal/user/RoleListController.php
Builds a row for an entity in the entity listing.

... See full list

File

drupal/core/lib/Drupal/Core/Entity/EntityListController.php, line 139
Contains \Drupal\Core\Entity\EntityListController.

Class

EntityListController
Provides a generic implementation of an entity list controller.

Namespace

Drupal\Core\Entity

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = $entity
    ->label();
  $row['id'] = $entity
    ->id();
  $operations = $this
    ->buildOperations($entity);
  $row['operations']['data'] = $operations;
  return $row;
}