RegistrationTypeListBuilder.php in RNG - Events and Registrations 8.2
File
src/Lists/RegistrationTypeListBuilder.php
View source
<?php
namespace Drupal\rng\Lists;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class RegistrationTypeListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Registration type');
$header['machine_name'] = $this
->t('Machine Name');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $this
->getLabel($entity);
$row['machine_name'] = $entity
->id();
return $row + parent::buildRow($entity);
}
public function render() {
$render = parent::render();
$render['table']['#empty'] = t('No registration types found.');
return $render;
}
}