public function FlagConfirmForm::getConfirmText in Flag 8.4
Returns a caption for the button that confirms the action.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup The form confirmation text.
Overrides ConfirmFormBase::getConfirmText
File
- src/
Form/ FlagConfirmForm.php, line 40
Class
- FlagConfirmForm
- Provides the confirm form page for flagging an entity.
Namespace
Drupal\flag\FormCode
public function getConfirmText() {
$link_plugin = $this->flag
->getLinkTypePlugin();
return $link_plugin instanceof FormEntryInterface ? $link_plugin
->getCreateButtonText() : $this
->t('Create flagging');
}