openlayers-8.x-4.x-dev/src/Controller/OpenlayersControlListBuilder.php
src/Controller/OpenlayersControlListBuilder.php
<?php
namespace Drupal\openlayers\Controller;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
/**
* Provides a listing of Openalyers Control configuration entities.
*/
class OpenlayersControlListBuilder extends ConfigEntityListBuilder {
/**
* {@inheritdoc}
*/
public function buildHeader() {
$header['label'] = $this->t('Control');
$header['id'] = $this->t('Machine name');
$header['service'] = $this->t('Factory service');
return $header + parent::buildHeader();
}
/**
* {@inheritdoc}
*/
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity->label();
$row['id'] = $entity->id();
$row['service'] = $entity->service();
return $row + parent::buildRow($entity);
}
}