function RulesContainerPlugin::exportFlat

Determines whether the element should be exported in flat style.

Flat style means that the export keys are written directly into the export array, whereas else the export is written into a sub-array.

2 calls to RulesContainerPlugin::exportFlat()
RulesContainerPlugin::exportToArray in includes/rules.core.inc
RulesContainerPlugin::import in includes/rules.core.inc
Applies the given export.
1 method overrides RulesContainerPlugin::exportFlat()
Rule::exportFlat in includes/rules.plugins.inc
Determines whether the element should be exported in flat style.

File

includes/rules.core.inc, line 2455

Class

RulesContainerPlugin
Base class for ContainerPlugins like Rules, Logical Operations or Loops.

Code

protected function exportFlat() {
    // By default we always use flat style for plugins without any parameters
    // or provided variables, as then only children have to be exported. E.g.
    // this applies to the OR and AND plugins.
    return $this->isRoot() || !$this->pluginParameterInfo() && !$this->providesVariables();
}