You are here

public function EntityFlagActionForm::getQuestion in farmOS 2.x

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

modules/core/flag/src/Form/EntityFlagActionForm.php, line 116

Class

EntityFlagActionForm
Provides an entity flag action form.

Namespace

Drupal\farm_flag\Form

Code

public function getQuestion() {
  return $this
    ->formatPlural(count($this->entities), 'Are you sure you want to flag this @item?', 'Are you sure you want to flag these @items?', [
    '@item' => $this->entityType
      ->getSingularLabel(),
    '@items' => $this->entityType
      ->getPluralLabel(),
  ]);
}