You are here

public function BlockDeleteForm::getQuestion in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/block/src/Form/BlockDeleteForm.php \Drupal\block\Form\BlockDeleteForm::getQuestion()

Overrides EntityDeleteFormTrait::getQuestion

File

core/modules/block/src/Form/BlockDeleteForm.php, line 32

Class

BlockDeleteForm
Provides a deletion confirmation form for the block instance deletion form.

Namespace

Drupal\block\Form

Code

public function getQuestion() {
  $entity = $this
    ->getEntity();
  $regions = $this
    ->systemRegionList($entity
    ->getTheme(), REGIONS_VISIBLE);
  return $this
    ->t('Are you sure you want to remove the @entity-type %label from the %region region?', [
    '@entity-type' => $entity
      ->getEntityType()
      ->getSingularLabel(),
    '%label' => $entity
      ->label(),
    '%region' => $regions[$entity
      ->getRegion()],
  ]);
}