Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / system / tests / modules / entity_test / src / EntityTestListBuilder.php
1 <?php
2
3 namespace Drupal\entity_test;
4
5 use Drupal\Core\Entity\EntityInterface;
6 use Drupal\Core\Entity\EntityListBuilder;
7
8 /**
9  * Defines a class to build a listing of entity test entities.
10  *
11  * @see \Drupal\entity_test\Entity\EntityTest
12  */
13 class EntityTestListBuilder extends EntityListBuilder {
14
15   /**
16    * {@inheritdoc}
17    */
18   public function buildHeader() {
19     $header['label'] = t('Label');
20     $header['id'] = t('Machine name');
21     return $header + parent::buildHeader();
22   }
23
24   /**
25    * {@inheritdoc}
26    */
27   public function buildRow(EntityInterface $entity) {
28     $row['label'] = $entity->label();
29     $row['id'] = $entity->id();
30     return $row + parent::buildRow($entity);
31   }
32
33 }