EnvironmentListBuilder.php in Environment 8
File
src/Controller/EnvironmentListBuilder.php
View source
<?php
namespace Drupal\environment\Controller;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class EnvironmentListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Environment');
$header['id'] = $this
->t('Machine name');
$header['description'] = $this
->t('Description');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $this
->getLabel($entity);
$row['id'] = $entity
->id();
$row['description'] = $entity
->get('description');
return $row + parent::buildRow($entity);
}
}