You are here

public function SimplemetaEntityListBuilder::buildRow in Simple Meta 8

Same name and namespace in other branches
  1. 8.2 src/SimplemetaEntityListBuilder.php \Drupal\simplemeta\SimplemetaEntityListBuilder::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/SimplemetaEntityListBuilder.php, line 31

Class

SimplemetaEntityListBuilder
Defines a class to build a listing of SimpleMeta entities.

Namespace

Drupal\simplemeta

Code

public function buildRow(EntityInterface $entity) {

  /* @var $entity \Drupal\simplemeta\Entity\SimplemetaEntity */
  $row['id'] = $entity
    ->id();
  $row['name'] = $this
    ->l($entity
    ->label(), new Url('entity.simplemeta.edit_form', array(
    'simplemeta' => $entity
      ->id(),
  )));
  return $row + parent::buildRow($entity);
}