public function DeleteExpressionForm::getQuestion in Rules 8.3
Returns the question to ask the user.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup The form question. The page title will be set to this value.
Overrides ConfirmFormInterface::getQuestion
File
- src/
Form/ DeleteExpressionForm.php, line 55
Class
- DeleteExpressionForm
- Removes an expression from a rule.
Namespace
Drupal\rules\FormCode
public function getQuestion() {
$rule_expression = $this->rulesUiHandler
->getComponent()
->getExpression();
$expression_inside = $rule_expression
->getExpression($this->uuid);
if (!$expression_inside) {
throw new NotFoundHttpException();
}
return $this
->t('Are you sure you want to delete %title from %rule?', [
'%title' => $expression_inside
->getLabel(),
'%rule' => $this->rulesUiHandler
->getComponentLabel(),
]);
}