You are here

protected function RulesContainerPlugin::exportFlat in Rules 7.2

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 2435
Rules base classes and interfaces needed for any rule evaluation.

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