You are here

public function RulesConditionalPredicateElement::label in Conditional Rules 7

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

Returns the label of the element.

Overrides RulesConditionalElement::label

File

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

Class

RulesConditionalPredicateElement
Base conditional element that uses a predicate.

Code

public function label() {
  $text = '@plugin';
  $variables = array(
    '@plugin' => $this
      ->pluginLabel(),
  );
  if (isset($this->predicate)) {
    $text = '@plugin: @label';
    $variables['@label'] = $this->predicate
      ->label();
  }
  return t($text, $variables);
}