public function PluginManagerBase::getDefinition in Service Container 7
Same name in this branch
- 7 src/Plugin/PluginManagerBase.php \Drupal\service_container\Plugin\PluginManagerBase::getDefinition()
- 7 lib/Drupal/Component/Plugin/PluginManagerBase.php \Drupal\Component\Plugin\PluginManagerBase::getDefinition()
Same name and namespace in other branches
- 7.2 src/Plugin/PluginManagerBase.php \Drupal\service_container\Plugin\PluginManagerBase::getDefinition()
Gets a specific plugin definition.
Parameters
string $plugin_id: A plugin id.
bool $exception_on_invalid: (optional) If TRUE, an invalid plugin ID will throw an exception.
Return value
mixed A plugin definition, or NULL if the plugin ID is invalid and $exception_on_invalid is FALSE.
Throws
\Drupal\Component\Plugin\Exception\PluginNotFoundException Thrown if $plugin_id is invalid and $exception_on_invalid is TRUE.
Overrides DiscoveryInterface::getDefinition
File
- src/
Plugin/ PluginManagerBase.php, line 36 - Contains \Drupal\service_container\Plugin\PluginManagerBase
Class
- PluginManagerBase
- Base class for plugin managers.
Namespace
Drupal\service_container\PluginCode
public function getDefinition($plugin_id, $exception_on_invalid = TRUE) {
return $this->discovery
->getDefinition($plugin_id, $exception_on_invalid);
}