Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / fontyourface / src / FontDisplayListBuilder.php
1 <?php
2
3 namespace Drupal\fontyourface;
4
5 use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
6 use Drupal\Core\Entity\EntityInterface;
7 use Drupal\fontyourface\Entity\Font;
8
9 /**
10  * Provides a listing of Font display entities.
11  */
12 class FontDisplayListBuilder extends ConfigEntityListBuilder {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function buildHeader() {
18     $header['label'] = $this->t('Font display');
19     $header['id'] = $this->t('Machine name');
20     $header['name'] = $this->t('Font');
21     $header['theme'] = $this->t('Theme');
22     return $header + parent::buildHeader();
23   }
24
25   /**
26    * {@inheritdoc}
27    */
28   public function buildRow(EntityInterface $entity) {
29     $font = $entity->getFont();
30     if (empty($font)) {
31       $font = Font::create(['name' => 'Font not supported!']);
32     }
33
34     $row['label'] = $entity->label();
35     $row['id'] = $entity->id();
36     $row['name'] = $font->name->value;
37     $row['theme'] = $entity->getTheme();
38     return $row + parent::buildRow($entity);
39   }
40
41 }