public function ConditionExpression::getLabel in Rules 8.3
The label of this expression element that can be shown in the UI.
Return value
string The label for display.
Overrides ExpressionBase::getLabel
1 call to ConditionExpression::getLabel()
- ConditionExpression::executeWithState in src/
Plugin/ RulesExpression/ ConditionExpression.php - Execute the expression with a given Rules state.
File
- src/
Plugin/ RulesExpression/ ConditionExpression.php, line 157
Class
- ConditionExpression
- Defines an executable condition expression.
Namespace
Drupal\rules\Plugin\RulesExpressionCode
public function getLabel() {
if (!empty($this->configuration['condition_id'])) {
$definition = $this->conditionManager
->getDefinition($this->configuration['condition_id']);
if ($this
->isNegated()) {
return $this
->t('@not @label', [
'@not' => $this
->t('NOT'),
'@label' => $definition['label'],
]);
}
else {
return $definition['label'];
}
}
return parent::getLabel();
}