class PluginNotFoundException in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Drupal/Component/Plugin/Exception/PluginNotFoundException.php \Drupal\Component\Plugin\Exception\PluginNotFoundException
Plugin exception class to be thrown when a plugin ID could not be found.
Hierarchy
- class \Drupal\Component\Plugin\Exception\PluginException extends \Drupal\Component\Plugin\Exception\Exception implements ExceptionInterface
- class \Drupal\Component\Plugin\Exception\PluginNotFoundException
Expanded class hierarchy of PluginNotFoundException
6 files declare their use of PluginNotFoundException
- AnnotatedClassDiscovery.php in modules/
providers/ service_container_annotation_discovery/ src/ Plugin/ Discovery/ AnnotatedClassDiscovery.php - Contains \Drupal\service_container_annotation_discovery\Plugin\Discovery\AnnotatedClassDiscovery
- CToolsPluginDiscovery.php in src/
Plugin/ Discovery/ CToolsPluginDiscovery.php - Contains \Drupal\service_container\Plugin\Discovery\CToolsPluginDiscovery
- DefaultPluginManagerTest.php in tests/
src/ Plugin/ DefaultPluginManagerTest.php - Contains \Drupal\Tests\service_container\Plugin\DefaultPluginManagerTest
- DiscoveryTrait.php in lib/
Drupal/ Component/ Plugin/ Discovery/ DiscoveryTrait.php - Contains \Drupal\Component\Plugin\Discovery\DiscoveryTrait.
- PluginManagerBase.php in src/
Plugin/ PluginManagerBase.php - Contains \Drupal\service_container\Plugin\PluginManagerBase
File
- lib/
Drupal/ Component/ Plugin/ Exception/ PluginNotFoundException.php, line 13 - Contains \Drupal\Component\Plugin\Exception\PluginNotFoundException.
Namespace
Drupal\Component\Plugin\ExceptionView source
class PluginNotFoundException extends PluginException {
/**
* Construct an PluginNotFoundException exception.
*
* @param string $plugin_id
* The plugin ID that was not found.
*
* @see \Exception for remaining parameters.
*/
public function __construct($plugin_id, $message = '', $code = 0, \Exception $previous = NULL) {
if (empty($message)) {
$message = sprintf("Plugin ID '%s' was not found.", $plugin_id);
}
parent::__construct($message, $code, $previous);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginNotFoundException:: |
public | function | Construct an PluginNotFoundException exception. |