function RulesCondition::import

Overrides RulesAbstractPlugin::import

File

includes/rules.plugins.inc, line 136

Class

RulesCondition
Implements a rules condition.

Code

public function import(array $export) {
    $this->elementName = rules_array_key($export);
    if (strpos($this->elementName, 'NOT ') === 0) {
        $this->elementName = substr($this->elementName, 4);
        $this->negate = TRUE;
    }
    // After setting the element name, setup the element again so the right
    // element info is loaded.
    $this->setUp();
    // Re-add 'USING' which has been removed for abbreviation.
    $this->importSettings(array(
        'USING' => reset($export),
    ));
}