function ShortcutSetListBuilder::getDefaultOperations

Same name in other branches
  1. 8.9.x core/modules/shortcut/src/ShortcutSetListBuilder.php \Drupal\shortcut\ShortcutSetListBuilder::getDefaultOperations()
  2. 10 core/modules/shortcut/src/ShortcutSetListBuilder.php \Drupal\shortcut\ShortcutSetListBuilder::getDefaultOperations()
  3. 11.x core/modules/shortcut/src/ShortcutSetListBuilder.php \Drupal\shortcut\ShortcutSetListBuilder::getDefaultOperations()

Overrides ConfigEntityListBuilder::getDefaultOperations

File

core/modules/shortcut/src/ShortcutSetListBuilder.php, line 26

Class

ShortcutSetListBuilder
Defines a class to build a listing of shortcut set entities.

Namespace

Drupal\shortcut

Code

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.