public MenuLinkManager::resetLink($id)
Resets the values for a menu link based on the values found by discovery.
Parameters
string $id: The menu link plugin ID.
Return value
\Drupal\Core\Menu\MenuLinkInterface The menu link instance after being reset.
Throws
\Drupal\Component\Plugin\Exception\PluginException Thrown if the $id is not a valid, existing, plugin ID or if the link cannot be reset.
Overrides MenuLinkManagerInterface::resetLink
File
- core/lib/Drupal/Core/Menu/MenuLinkManager.php, line 378
Class
- MenuLinkManager
- Manages discovery, instantiation, and tree building of menu link plugins.
Namespace
Drupal\Core\Menu
Code
1 2 3 4 5 | public function resetLink( $id ) { $instance = $this ->createInstance( $id ); $new_instance = $this ->resetInstance( $instance ); return $new_instance ; } |
Please login to continue.