function MenuLinkManager::updateDefinition
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::updateDefinition()
- 10 core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::updateDefinition()
- 11.x core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::updateDefinition()
Overrides MenuLinkManagerInterface::updateDefinition
File
-
core/
lib/ Drupal/ Core/ Menu/ MenuLinkManager.php, line 363
Class
- MenuLinkManager
- Manages discovery, instantiation, and tree building of menu link plugins.
Namespace
Drupal\Core\MenuCode
public function updateDefinition($id, array $new_definition_values, $persist = TRUE) {
$instance = $this->createInstance($id);
if ($instance) {
$new_definition_values['id'] = $id;
$changed_definition = $instance->updateLink($new_definition_values, $persist);
$this->treeStorage
->save($changed_definition);
}
return $instance;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.