function BlockDeleteForm::getDeletionMessage

Same name in other branches
  1. 9 core/modules/block/src/Form/BlockDeleteForm.php \Drupal\block\Form\BlockDeleteForm::getDeletionMessage()
  2. 8.9.x core/modules/block/src/Form/BlockDeleteForm.php \Drupal\block\Form\BlockDeleteForm::getDeletionMessage()
  3. 11.x core/modules/block/src/Form/BlockDeleteForm.php \Drupal\block\Form\BlockDeleteForm::getDeletionMessage()

Overrides EntityDeleteFormTrait::getDeletionMessage

File

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

Class

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

Namespace

Drupal\block\Form

Code

protected function getDeletionMessage() {
    $entity = $this->getEntity();
    $regions = $this->systemRegionList($entity->getTheme(), REGIONS_VISIBLE);
    return $this->t('The @entity-type %label has been removed from the %region region.', [
        '@entity-type' => $entity->getEntityType()
            ->getSingularLabel(),
        '%label' => $entity->label(),
        '%region' => $regions[$entity->getRegion()],
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.