1 {% extends "base/class.php.twig" %}
4 \Drupal\{{module}}\{{ entity_class }}ListBuilder.
7 {% block namespace_class %}
8 namespace Drupal\{{module}};
12 use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
13 use Drupal\Core\Entity\EntityInterface;
16 {% block class_declaration %}
18 * Provides a listing of {{ label }} entities.
20 class {{ entity_class }}ListBuilder extends ConfigEntityListBuilder {% endblock %}
21 {% block class_methods %}
25 public function buildHeader() {
26 $header['label'] = $this->t('{{ label }}');
27 $header['id'] = $this->t('Machine name');
28 return $header + parent::buildHeader();
34 public function buildRow(EntityInterface $entity) {
35 $row['label'] = $entity->label();
36 $row['id'] = $entity->id();
37 // You probably want a few more properties here...
38 return $row + parent::buildRow($entity);