6b42c8226df574456e05da120b5f93cd17726d63
[yaffs-website] / web / modules / contrib / fontyourface / modules / local_fonts / src / LocalFontConfigEntityListBuilder.php
1 <?php
2
3 namespace Drupal\local_fonts;
4
5 use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
6 use Drupal\Core\Entity\EntityInterface;
7
8 /**
9  * Provides a listing of Custom Font entities.
10  */
11 class LocalFontConfigEntityListBuilder extends ConfigEntityListBuilder {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function buildHeader() {
17     $header['label'] = $this->t('Custom Font');
18     $header['id'] = $this->t('Machine name');
19     $header['font_family'] = $this->t('Font Family');
20     return $header + parent::buildHeader();
21   }
22
23   /**
24    * {@inheritdoc}
25    */
26   public function buildRow(EntityInterface $entity) {
27     $row['label'] = $entity->label();
28     $row['id'] = $entity->id();
29     $row['font_family'] = $entity->font_family;
30     return $row + parent::buildRow($entity);
31   }
32
33 }