function rules_plugin_factory in Rules 7.2
Creates a new instance of a the given rules plugin.
Return value
17 calls to rules_plugin_factory()
- rule in ./
rules.module - Creates a new rule.
- RulesContainerPlugin::importChildren in includes/
rules.core.inc - RulesEntityController::import in includes/
rules.core.inc - Overridden to work with Rules' custom export format.
- rules_action in ./
rules.module - Returns a new rules action.
- rules_action_set in ./
rules.module - Creates an action set.
File
- ./
rules.module, line 691 - Rules engine module.
Code
function rules_plugin_factory($plugin_name, $arg1 = NULL, $arg2 = NULL) {
$cache = rules_get_cache();
if (isset($cache['plugin_info'][$plugin_name]['class'])) {
return new $cache['plugin_info'][$plugin_name]['class']($arg1, $arg2);
}
}