function AddExpressionForm::getTitle

Provides the page title on the form.

Overrides EditExpressionForm::getTitle

File

src/Form/AddExpressionForm.php, line 98

Class

AddExpressionForm
UI form to add an expression like a condition or action to a rule.

Namespace

Drupal\rules\Form

Code

public function getTitle(RulesUiHandlerInterface $rules_ui_handler, $expression_id) {
    $this->expressionId = $expression_id;
    $expression = $this->expressionManager
        ->createInstance($this->expressionId);
    return $this->t('Add @expression', [
        '@expression' => $expression->getLabel(),
    ]);
}