7a4bdfc4c809b5e14db0717edf50fc75ca6bb95d
[yaffs-website] / web / core / modules / block_content / src / BlockContentListBuilder.php
1 <?php
2
3 namespace Drupal\block_content;
4
5 use Drupal\Core\Entity\EntityInterface;
6 use Drupal\Core\Entity\EntityListBuilder;
7
8 /**
9  * Defines a class to build a listing of custom block entities.
10  *
11  * @see \Drupal\block_content\Entity\BlockContent
12  */
13 class BlockContentListBuilder extends EntityListBuilder {
14
15   /**
16    * {@inheritdoc}
17    */
18   public function buildHeader() {
19     $header['label'] = t('Block description');
20     return $header + parent::buildHeader();
21   }
22
23   /**
24    * {@inheritdoc}
25    */
26   public function buildRow(EntityInterface $entity) {
27     $row['label'] = $entity->label();
28     return $row + parent::buildRow($entity);
29   }
30
31 }