You are here

public function PrepareModulesEntityUninstallForm::getConfirmText in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php \Drupal\system\Form\PrepareModulesEntityUninstallForm::getConfirmText()

Returns a caption for the button that confirms the action.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The form confirmation text.

Overrides ConfirmFormBase::getConfirmText

File

core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php, line 81

Class

PrepareModulesEntityUninstallForm
Provides a form removing module content entities data before uninstallation.

Namespace

Drupal\system\Form

Code

public function getConfirmText() {
  $entity_type = $this->entityTypeManager
    ->getDefinition($this->entityTypeId);
  return $this
    ->t('Delete all @entity_type_plural', [
    '@entity_type_plural' => $entity_type
      ->getPluralLabel(),
  ]);
}