You are here

public function FlagConfirmForm::getQuestion in Flag 8.4

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/FlagConfirmForm.php, line 25

Class

FlagConfirmForm
Provides the confirm form page for flagging an entity.

Namespace

Drupal\flag\Form

Code

public function getQuestion() {
  $link_plugin = $this->flag
    ->getLinkTypePlugin();
  return $link_plugin instanceof FormEntryInterface ? $link_plugin
    ->getFlagQuestion() : $this
    ->t('Flag this content');
}