public function RulesEventManager::createInstance in Rules 8.3
Creates a pre-configured instance of a plugin.
Parameters
string $plugin_id: The ID of the plugin being instantiated.
array $configuration: An array of configuration relevant to the plugin instance.
Return value
object A fully configured plugin instance.
Throws
\Drupal\Component\Plugin\Exception\PluginException If the instance cannot be created, such as if the ID is invalid.
Overrides PluginManagerBase::createInstance
File
- src/
Core/ RulesEventManager.php, line 60
Class
- RulesEventManager
- Plugin manager for Rules events that can be triggered.
Namespace
Drupal\rules\CoreCode
public function createInstance($plugin_id, array $configuration = []) {
// If a fully qualified event name is passed, be sure to get the base name
// first.
$plugin_id = $this
->getEventBaseName($plugin_id);
return parent::createInstance($plugin_id, $configuration);
}