SliderProListBuilder.php in Slider Pro 8
File
src/Controller/SliderProListBuilder.php
View source
<?php
namespace Drupal\slider_pro\Controller;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class SliderProListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Name');
$header['id'] = $this
->t('Machine name');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
$row['id'] = $entity
->id();
return $row + parent::buildRow($entity);
}
public function getDefaultOperations(EntityInterface $entity) {
$ops = parent::getDefaultOperations($entity);
if ($entity
->id() == 'default') {
unset($ops['delete']);
}
return $ops;
}
}