public function UnflagConfirmForm::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/ UnflagConfirmForm.php, line 39
Class
- UnflagConfirmForm
- Provides the confirm form page for unflagging an entity.
Namespace
Drupal\flag\FormCode
public function getConfirmText() {
$link_plugin = $this->flag
->getLinkTypePlugin();
return $link_plugin instanceof FormEntryInterface ? $link_plugin
->getDeleteButtonText() : $this
->t('Delete flagging');
}