You are here

public function PopupOnLoadListBuilder::buildRow in Popup On Load 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/PopupOnLoadListBuilder.php, line 27

Class

PopupOnLoadListBuilder
Defines a class to build a listing of Popup On Load entities.

Namespace

Drupal\popup_onload

Code

public function buildRow(EntityInterface $entity) {

  /* @var $entity \Drupal\popup_onload\Entity\PopupOnLoad */
  $row['name']['data'] = [
    '#type' => 'link',
    '#title' => $entity
      ->label(),
    '#url' => new Url('entity.popup_onload.edit_form', [
      'popup_onload' => $entity
        ->id(),
    ]),
  ];
  return $row + parent::buildRow($entity);
}