function RulesAbstractPlugin::integrityCheck

Makes sure the plugin is configured right.

"Configured right" means all needed variables are available in the element's scope and dependent modules are enabled.

Return value

$this

Overrides RulesPlugin::integrityCheck

File

includes/rules.core.inc, line 1600

Class

RulesAbstractPlugin
Defines a common base class for so-called "Abstract Plugins" like actions.

Code

public function integrityCheck() {
  // Do the usual integrity check first so the implementation's validation
  // handler can rely on that already.
  parent::integrityCheck();
  // Make sure the element is known.
  $this->forceSetUp();
  if (!isset($this->cache[$this->itemName . '_info'][$this->elementName])) {
    throw new RulesIntegrityException(t('Unknown @plugin %name.', array(
      '@plugin' => $this->plugin(),
      '%name' => $this->elementName,
    )));
  }
  $this->validate();
  return $this;
}