function BundleEntityDeleteForm::getAdditionalReasonsToPreventDeletion

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/Form/BundleEntityDeleteForm.php \Drupal\Core\Entity\Form\BundleEntityDeleteForm::getAdditionalReasonsToPreventDeletion()

Gets a list of additional reasons preventing deletion of the bundle entity.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup[] An array of translated strings, each one giving a separate reason for preventing deletion. These are shown each in a paragraph on the form. If the array is empty, and there are no content entities, then deletion is allowed.

2 calls to BundleEntityDeleteForm::getAdditionalReasonsToPreventDeletion()
BundleEntityDeleteForm::buildForm in core/lib/Drupal/Core/Entity/Form/BundleEntityDeleteForm.php
Form constructor.
CommentTypeDeleteForm::getAdditionalReasonsToPreventDeletion in core/modules/comment/src/Form/CommentTypeDeleteForm.php
Gets a list of additional reasons preventing deletion of the bundle entity.
1 method overrides BundleEntityDeleteForm::getAdditionalReasonsToPreventDeletion()
CommentTypeDeleteForm::getAdditionalReasonsToPreventDeletion in core/modules/comment/src/Form/CommentTypeDeleteForm.php
Gets a list of additional reasons preventing deletion of the bundle entity.

File

core/lib/Drupal/Core/Entity/Form/BundleEntityDeleteForm.php, line 123

Class

BundleEntityDeleteForm
A generic entity delete form for entities which are bundles.

Namespace

Drupal\Core\Entity\Form

Code

protected function getAdditionalReasonsToPreventDeletion() : array {
  return [];
}

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