function MenuLinkContentInterface::requiresRediscovery

Same name in other branches
  1. 9 core/modules/menu_link_content/src/MenuLinkContentInterface.php \Drupal\menu_link_content\MenuLinkContentInterface::requiresRediscovery()
  2. 8.9.x core/modules/menu_link_content/src/MenuLinkContentInterface.php \Drupal\menu_link_content\MenuLinkContentInterface::requiresRediscovery()
  3. 10 core/modules/menu_link_content/src/MenuLinkContentInterface.php \Drupal\menu_link_content\MenuLinkContentInterface::requiresRediscovery()

Returns whether the menu link requires rediscovery.

If a menu-link points to a user-supplied path such as /blog then the route this resolves to needs to be rediscovered as the module or route providing a given path might change over time.

For example: at the time a menu-link is created, the /blog path might be provided by a route in Views module, but later this path may be served by the Panels module. Flagging a link as requiring rediscovery ensures that if the route that provides a user-entered path changes over time, the link is flexible enough to update to reflect these changes.

Return value

bool TRUE if the menu link requires rediscovery during route rebuilding.

1 method overrides MenuLinkContentInterface::requiresRediscovery()
MenuLinkContent::requiresRediscovery in core/modules/menu_link_content/src/Entity/MenuLinkContent.php

File

core/modules/menu_link_content/src/MenuLinkContentInterface.php, line 118

Class

MenuLinkContentInterface
Defines an interface for custom menu links.

Namespace

Drupal\menu_link_content

Code

public function requiresRediscovery();

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