function RulesAbstractPlugin::import

Overrides RulesPlugin::import

1 method overrides RulesAbstractPlugin::import()
RulesCondition::import in includes/rules.plugins.inc
Applies the given export.

File

includes/rules.core.inc, line 1659

Class

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

Code

public function import(array $export) {
    // The key is the element name and the value the actual export.
    $this->elementName = rules_array_key($export);
    $export = reset($export);
    // After setting the element name, setup the element again so the right
    // element info is loaded.
    $this->setUp();
    if (!isset($export['USING']) && !isset($export['PROVIDES']) && !empty($export)) {
        // The export has been abbreviated to skip "USING".
        $export = array(
            'USING' => $export,
        );
    }
    $this->importSettings($export);
}