function _ultimate_cron_plugin_load_all in Ultimate Cron 7.2
Load all callback for plugins.
Parameters
string $type: Type of the plugin (settings, scheduler, launcher, logger).
Return value
array The instances of the plugin type (singletons).
26 calls to _ultimate_cron_plugin_load_all()
- drush_ultimate_cron_cron_job_set in ./
ultimate_cron.drush.inc - Set a cron jobs configuration.
- UltimateCronJob::build_operations_alter in ./
ultimate_cron.job.inc - Allow a job to alter the allowed operations on it in the Export UI.
- UltimateCronJob::cron_alter in ./
ultimate_cron.job.inc - Invoke plugin cron_alter().
- UltimateCronJob::getPluginSettings in ./
ultimate_cron.job.inc - Get plugin settings.
- UltimateCronPlugin::defaultSettingsForm in ./
ultimate_cron.plugin.inc - Default settings form.
File
- ./
ultimate_cron.module, line 299
Code
function _ultimate_cron_plugin_load_all($type, $reset = FALSE) {
$cache =& drupal_static('ultimate_cron_plugin_load_all', array());
if (!$reset && isset($cache[$type])) {
return $cache[$type];
}
if ($reset) {
drupal_static_reset('ctools_plugins');
drupal_static_reset('ctools_plugin_setup');
}
ctools_include('plugins');
$plugin_infos = ctools_get_plugins('ultimate_cron', $type);
$plugins = array();
foreach ($plugin_infos as $name => $plugin) {
if ($object = ultimate_cron_ctools_plugin_instance($name, $plugin)) {
$plugins[$name] = $object;
}
}
$cache[$type] = $plugins;
return $cache[$type];
}