AccessSchemeListBuilder.php in Workbench Access 8
File
src/AccessSchemeListBuilder.php
View source
<?php
namespace Drupal\workbench_access;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class AccessSchemeListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Access scheme');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
return $row + parent::buildRow($entity);
}
public function getDefaultOperations(EntityInterface $entity) {
return parent::getDefaultOperations($entity) + [
'sections' => [
'title' => $this
->t('Sections'),
'weight' => 0,
'url' => $entity
->toUrl('sections'),
],
];
}
}