public function UnflaggingForm::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/ UnflaggingForm.php, line 61
Class
- UnflaggingForm
- 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('Unflag');
}