class PluginNotFoundException in Plug 7
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
3 files declare their use of PluginNotFoundException
- DefaultLazyPluginCollection.php in lib/
Drupal/ Core/ Plugin/ DefaultLazyPluginCollection.php - Contains \Drupal\Core\Plugin\DefaultLazyPluginCollection.
- DiscoveryTrait.php in lib/
Drupal/ Component/ Plugin/ Discovery/ DiscoveryTrait.php - Contains \Drupal\Component\Plugin\Discovery\DiscoveryTrait.
- PluginManagerBase.php in lib/
Drupal/ Component/ Plugin/ PluginManagerBase.php - Contains \Drupal\Component\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. |