You are here

public function LogListBuilder::buildRow in Log entity 8

Same name and namespace in other branches
  1. 2.x src/LogListBuilder.php \Drupal\log\LogListBuilder::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/LogListBuilder.php, line 34
Contains \Drupal\log\LogListBuilder.

Class

LogListBuilder
Defines a class to build a listing of Log entities.

Namespace

Drupal\log

Code

public function buildRow(EntityInterface $entity) {

  /* @var $entity \Drupal\log\Entity\Log */
  $row['id'] = $entity
    ->id();
  $row['name'] = $this
    ->l($entity
    ->label(), $entity
    ->toUrl('canonical'));

  // @todo Show type name.
  $row['type'] = $entity
    ->bundle();
  return $row + parent::buildRow($entity);
}