TemplateListBuilder.php in Workbench Email 8
File
src/TemplateListBuilder.php
View source
<?php
namespace Drupal\workbench_email;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class TemplateListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Email Template');
$header['id'] = $this
->t('Machine name');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->toLink($entity
->label(), 'edit-form');
$row['id'] = $entity
->id();
return $row + parent::buildRow($entity);
}
}