function RequiredContextDelete::getQuestion

Same name and namespace in other branches
  1. 4.0.x src/Form/RequiredContextDelete.php \Drupal\ctools\Form\RequiredContextDelete::getQuestion()

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

1 call to RequiredContextDelete::getQuestion()
RequiredContextDelete::buildForm in src/Form/RequiredContextDelete.php
Form constructor.

File

src/Form/RequiredContextDelete.php, line 111

Class

RequiredContextDelete
Base class for adding a required contexts step to your wizard.

Namespace

Drupal\ctools\Form

Code

public function getQuestion($id = NULL, $cached_values = NULL) {
  $context = $this->getContexts($cached_values)[$id];
  return $this->t('Are you sure you want to delete the @label context?', [
    '@label' => $context['label'],
  ]);
}