ShortcutSetListBuilder.php in Drupal 10
File
core/modules/shortcut/src/ShortcutSetListBuilder.php
View source
<?php
namespace Drupal\shortcut;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class ShortcutSetListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['name'] = t('Name');
return $header + parent::buildHeader();
}
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
if (isset($operations['edit'])) {
$operations['edit']['title'] = t('Edit shortcut set');
}
$operations['list'] = [
'title' => t('List links'),
'url' => $entity
->toUrl('customize-form'),
];
return $operations;
}
public function buildRow(EntityInterface $entity) {
$row['name'] = $entity
->label();
return $row + parent::buildRow($entity);
}
}