public function MenuLinkManager::hasDefinition in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::hasDefinition()
Indicates if a specific plugin definition exists.
Parameters
string $plugin_id: A plugin ID.
Return value
bool TRUE if the definition exists, FALSE otherwise.
Overrides DiscoveryInterface::hasDefinition
File
- core/
lib/ Drupal/ Core/ Menu/ MenuLinkManager.php, line 214
Class
- MenuLinkManager
- Manages discovery, instantiation, and tree building of menu link plugins.
Namespace
Drupal\Core\MenuCode
public function hasDefinition($plugin_id) {
return (bool) $this
->getDefinition($plugin_id, FALSE);
}