You are here

function _ultimate_cron_plugin_require in Ultimate Cron 7.2

Require callback for plugins.

Parameters

string $type: Type of the plugin (settings, scheduler, launcher, logger).

string $name: Name of the plugin (general, queue, serial, database, etc.).

Return value

object The instance of the plugin (singleton).

Throws

\RuntimeException Throws a \RuntimeException if the plugin could not be loaded.

10 calls to _ultimate_cron_plugin_require()
UltimateCronJob::getPlugin in ./ultimate_cron.job.inc
Get job plugin.
UltimateCronJob::signal in ./ultimate_cron.job.inc
Signal page for plugins.
UltimateCronPlugin::jobSettingsFormSubmit in ./ultimate_cron.plugin.inc
Job settings form submit handler.
UltimateCronPlugin::jobSettingsFormValidate in ./ultimate_cron.plugin.inc
Job settings form validate handler.
ultimate_cron_plugin_cleanup in ./ultimate_cron.module
Plugin clean up cron job.

... See full list

File

./ultimate_cron.module, line 254

Code

function _ultimate_cron_plugin_require($type, $name) {
  $object = _ultimate_cron_plugin_load($type, $name);
  if (!is_object($object)) {
    throw new \RuntimeException(t('Ultimate Cron failed to require ctools "!type" plugin "!name"', array(
      '!type' => $type,
      '!name' => $name,
    )));
  }
  return $object;
}