Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / pathauto / src / PathautoPatternListBuilder.php
1 <?php
2
3 namespace Drupal\pathauto;
4
5 use Drupal\Core\Config\Entity\DraggableListBuilder;
6 use Drupal\Core\Entity\EntityInterface;
7
8 /**
9  * Provides a listing of Pathauto pattern entities.
10  */
11 class PathautoPatternListBuilder extends DraggableListBuilder {
12
13   /**
14    * {@inheritdoc}
15    */
16   protected $limit = FALSE;
17
18   /**
19    * {@inheritdoc}
20    */
21   public function getFormId() {
22     return 'pathauto_pattern_list';
23   }
24
25   /**
26    * {@inheritdoc}
27    */
28   public function buildHeader() {
29     $header['label'] = $this->t('Label');
30     $header['pattern'] = $this->t('Pattern');
31     $header['type'] = $this->t('Pattern type');
32     $header['conditions'] = $this->t('Conditions');
33     return $header + parent::buildHeader();
34   }
35
36   /**
37    * {@inheritdoc}
38    */
39   public function buildRow(EntityInterface $entity) {
40     /* @var \Drupal\pathauto\PathautoPatternInterface $entity */
41     $row['label'] = $entity->label();
42     $row['patern']['#markup'] = $entity->getPattern();
43     $row['type']['#markup'] = $entity->getAliasType()->getLabel();
44     $row['conditions']['#theme'] = 'item_list';
45     foreach ($entity->getSelectionConditions() as $condition) {
46       $row['conditions']['#items'][] = $condition->summary();
47     }
48     return $row + parent::buildRow($entity);
49   }
50
51 }