public function DiscoveryInterface::getDefinition in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Drupal/Component/Plugin/Discovery/DiscoveryInterface.php \Drupal\Component\Plugin\Discovery\DiscoveryInterface::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.
5 methods override DiscoveryInterface::getDefinition()
- AnnotatedClassDiscovery::getDefinition in modules/
providers/ service_container_annotation_discovery/ src/ Plugin/ Discovery/ AnnotatedClassDiscovery.php - Gets a specific plugin definition.
- Container::getDefinition in src/
DependencyInjection/ Container.php - Gets a specific plugin definition.
- ContainerAwarePluginManager::getDefinition in src/
Plugin/ ContainerAwarePluginManager.php - Gets a specific plugin definition.
- CToolsPluginDiscovery::getDefinition in src/
Plugin/ Discovery/ CToolsPluginDiscovery.php - Gets a specific plugin definition.
- PluginManagerBase::getDefinition in src/
Plugin/ PluginManagerBase.php - Gets a specific plugin definition.
File
- lib/
Drupal/ Component/ Plugin/ Discovery/ DiscoveryInterface.php, line 33 - Contains \Drupal\Component\Plugin\Discovery\DiscoveryInterface.
Class
- DiscoveryInterface
- An interface defining the minimum requirements of building a plugin discovery component.
Namespace
Drupal\Component\Plugin\DiscoveryCode
public function getDefinition($plugin_id, $exception_on_invalid = TRUE);