You are here

public function SliderListBuilder::buildRow in Image sliders 8

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/Entity/Controller/SliderListBuilder.php, line 86

Class

SliderListBuilder
Provides a list controller for image_slider entity.

Namespace

Drupal\image_slider\Entity\Controller

Code

public function buildRow(EntityInterface $entity) {
  $row['id'] = $entity
    ->id();
  $row['name'] = $entity
    ->label();
  $row['role'] = $entity->role->value;
  return $row + parent::buildRow($entity);
}