public function UltimateCronJob::getSettings in Ultimate Cron 7.2
Get job settings.
Parameters
string $type: (optional) The plugin type to get settings for.
Return value
array The settings for the given plugin. If no plugin is given, returns all settings.
File
- ./
ultimate_cron.job.inc, line 147 - Job class for Ultimate Cron.
Class
- UltimateCronJob
- Class for handling cron jobs.
Code
public function getSettings($type = '') {
if (isset($this->cacheSettings)) {
if ($type) {
$settings = !empty($this->cacheSettings[$type]['name']) ? $this->cacheSettings[$type][$this->cacheSettings[$type]['name']] : $this->cacheSettings[$type];
}
else {
$settings = $this->cacheSettings;
}
return $settings;
}
ctools_include('plugins');
$settings = array();
$plugin_types = ctools_plugin_get_plugin_type_info();
foreach ($plugin_types['ultimate_cron'] as $plugin_type => $plugin_info) {
$settings[$plugin_info['type']] = $this
->getPluginSettings($plugin_type);
}
$this->cacheSettings = $settings;
return $this
->getSettings($type);
}