public function MenuLinkMock::updateLink in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php \Drupal\Tests\Core\Menu\MenuLinkMock::updateLink()
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/
tests/ Drupal/ Tests/ Core/ Menu/ MenuLinkMock.php, line 70 - Contains \Drupal\Tests\Core\Menu\MenuLinkMock.
Class
- MenuLinkMock
- Defines a mock implementation of a menu link used in tests only.
Namespace
Drupal\Tests\Core\MenuCode
public function updateLink(array $new_definition_values, $persist) {
// No-op.
return $this->pluginDefinition;
}