You are here

public function RulesConditionalPredicateUI::buildContent in Conditional Rules 7

Same name and namespace in other branches
  1. 8 includes/rules_conditional.ui.inc \RulesConditionalPredicateUI::buildContent()

Implements RulesPluginUIInterface.

Shows a preview of the configuration settings.

Overrides RulesContainerPluginUI::buildContent

File

includes/rules_conditional.ui.inc, line 120
Plugin UI implementation.

Class

RulesConditionalPredicateUI
UI for configuring the predicate in a conditional branch.

Code

public function buildContent() {
  $content = NULL;
  if (isset($this->predicate)) {

    // Build default content.
    $content = parent::buildContent();

    // Build parameter description from predicate.
    $predicateContent = $this->predicate
      ->buildContent();
    if (isset($predicateContent['description']['parameter'])) {
      $content['description']['parameter'] = $predicateContent['description']['parameter'];
    }
  }
  return $content;
}