You are here

protected function RulesConditionalPredicateElement::exportPredicate in Conditional Rules 8

Same name and namespace in other branches
  1. 7 includes/rules_conditional.core.inc \RulesConditionalPredicateElement::exportPredicate()

Exports predicate.

2 calls to RulesConditionalPredicateElement::exportPredicate()
RulesConditionalIf::exportPredicate in includes/rules_conditional.plugin.inc
Exports predicate.
RulesConditionalPredicateElement::exportChildren in includes/rules_conditional.core.inc
Exports predicate with actions.
1 method overrides RulesConditionalPredicateElement::exportPredicate()
RulesConditionalIf::exportPredicate in includes/rules_conditional.plugin.inc
Exports predicate.

File

includes/rules_conditional.core.inc, line 539
Conditional Rules framework implementation.

Class

RulesConditionalPredicateElement
Base conditional element that uses a predicate.

Code

protected function exportPredicate($key = NULL) {
  $export = array();
  if (!isset($key)) {
    $key = strtoupper($this
      ->plugin());
  }
  if (isset($this->predicate)) {
    $export[$key] = $this->predicate
      ->export();
  }
  return $export;
}