function MenuLinkListBuilder::getDefaultOperations

Same name and namespace in other branches
  1. 11.x core/modules/menu_link_content/src/MenuLinkListBuilder.php \Drupal\menu_link_content\MenuLinkListBuilder::getDefaultOperations()

File

core/modules/menu_link_content/src/MenuLinkListBuilder.php, line 54

Class

MenuLinkListBuilder
Provides a menu link list builder.

Namespace

Drupal\menu_link_content

Code

public function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);
  $destination = $this->redirectDestination
    ->get();
  foreach ($operations as $key => $operation) {
    $operations[$key]['query']['destination'] = $destination;
  }
  return $operations;
}

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