localgov_alert_banner-1.8.5/src/AlertBannerEntityTypeListBuilder.php
src/AlertBannerEntityTypeListBuilder.php
<?php
declare(strict_types=1);
namespace Drupal\localgov_alert_banner;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
/**
* Provides a listing of Alert banner type entities.
*/
class AlertBannerEntityTypeListBuilder extends ConfigEntityListBuilder {
/**
* {@inheritdoc}
*/
public function buildHeader() {
$header['label'] = $this->t('Alert banner type');
$header['id'] = $this->t('Machine name');
return $header + parent::buildHeader();
}
/**
* {@inheritdoc}
*/
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity->label();
$row['id'] = $entity->id();
return $row + parent::buildRow($entity);
}
}
