W3cubDocs

/Drupal 8

public function InaccessibleMenuLink::updateLink

public InaccessibleMenuLink::updateLink(array $new_definition_values, $persist)

Updates the definition values for a menu link.

Depending on the implementation details of the class, not all definition values may be changed. For example, changes to the title of a static link will be discarded.

In general, this method should not be called directly, but will be called automatically from MenuLinkManagerInterface::updateDefinition().

Parameters

array $new_definition_values: The new values for the link definition. This will usually be just a subset of the plugin definition.

bool $persist: TRUE to have the link persist the changed values to any additional storage.

Return value

array The plugin definition incorporating any allowed changes.

Overrides MenuLinkInterface::updateLink

File

core/lib/Drupal/Core/Menu/InaccessibleMenuLink.php, line 76

Class

InaccessibleMenuLink
A menu link plugin for wrapping another menu link, in sensitive situations.

Namespace

Drupal\Core\Menu

Code

public function updateLink(array $new_definition_values, $persist) {
  throw new PluginException('Inaccessible menu link plugins do not support updating');
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!InaccessibleMenuLink.php/function/InaccessibleMenuLink::updateLink/8.1.x