ParallaxElementListBuilder.php in Parallax Background 8
File
src/ParallaxElementListBuilder.php
View source
<?php
namespace Drupal\parallax_bg;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class ParallaxElementListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Selector');
$header['position'] = $this
->t('Position');
$header['speed'] = $this
->t('Speed');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
$row['position'] = $entity
->getPosition();
$row['speed'] = $entity
->getSpeed();
return $row + parent::buildRow($entity);
}
}