PopupOnLoadListBuilder.php in Popup On Load 8
File
src/PopupOnLoadListBuilder.php
View source
<?php
namespace Drupal\popup_onload;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
use Drupal\Core\Url;
class PopupOnLoadListBuilder extends EntityListBuilder {
public function buildHeader() {
$header['name'] = $this
->t('Name');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$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);
}
}