You are here

public function FrontendEnvironmentListBuilder::buildRow in Build Hooks 3.x

Same name and namespace in other branches
  1. 8.2 src/FrontendEnvironmentListBuilder.php \Drupal\build_hooks\FrontendEnvironmentListBuilder::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 EntityListBuilder::buildRow

See also

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

File

src/FrontendEnvironmentListBuilder.php, line 26

Class

FrontendEnvironmentListBuilder
Provides a listing of Frontend environment entities.

Namespace

Drupal\build_hooks

Code

public function buildRow(EntityInterface $entity) {

  /** @var \Drupal\build_hooks\Entity\FrontendEnvironment $entity */
  $row['label'] = $entity
    ->label();
  $row['plugin'] = $entity
    ->getPlugin()
    ->getPluginDefinition()['label'];
  $row['id'] = $entity
    ->id();
  return $row + parent::buildRow($entity);
}