function RulesAbstractPlugin::integrityCheck

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;
}