EpicListBuilder.php in Drupal PM (Project Management) 4.x
File
modules/pm_epic/src/EpicListBuilder.php
View source
<?php
namespace Drupal\pm_epic;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
use Drupal\Core\Link;
class EpicListBuilder extends EntityListBuilder {
public function buildHeader() {
$header['id'] = $this
->t('Epic ID');
$header['name'] = $this
->t('Name');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['id'] = $entity
->id();
$row['name'] = Link::createFromRoute($entity
->label(), 'entity.pm_epic.edit_form', [
'pm_epic' => $entity
->id(),
]);
return $row + parent::buildRow($entity);
}
}