public MenuLinkManager::getDefinition($plugin_id, $exception_on_invalid = TRUE)
Gets a specific plugin definition.
string $plugin_id: A plugin id.
bool $exception_on_invalid: (optional) If TRUE, an invalid plugin ID will throw an exception.
mixed A plugin definition, or NULL if the plugin ID is invalid and $exception_on_invalid is FALSE.
\Drupal\Component\Plugin\Exception\PluginNotFoundException Thrown if $plugin_id is invalid and $exception_on_invalid is TRUE.
Overrides DiscoveryInterface::getDefinition
public function getDefinition($plugin_id, $exception_on_invalid = TRUE) { $definition = $this->treeStorage->load($plugin_id); if (empty($definition) && $exception_on_invalid) { throw new PluginNotFoundException($plugin_id); } return $definition; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!MenuLinkManager.php/function/MenuLinkManager::getDefinition/8.1.x