3 namespace Drupal\shortcut;
5 use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
6 use Drupal\Core\Entity\EntityInterface;
9 * Defines a class to build a listing of shortcut set entities.
11 * @see \Drupal\shortcut\Entity\ShortcutSet
13 class ShortcutSetListBuilder extends ConfigEntityListBuilder {
18 public function buildHeader() {
19 $header['name'] = t('Name');
20 return $header + parent::buildHeader();
26 public function getDefaultOperations(EntityInterface $entity) {
27 $operations = parent::getDefaultOperations($entity);
29 if (isset($operations['edit'])) {
30 $operations['edit']['title'] = t('Edit shortcut set');
33 $operations['list'] = [
34 'title' => t('List links'),
35 'url' => $entity->urlInfo('customize-form'),
43 public function buildRow(EntityInterface $entity) {
44 $row['name'] = $entity->label();
45 return $row + parent::buildRow($entity);