function EntityDeleteForm::buildForm
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityDeleteForm.php \Drupal\Core\Entity\EntityDeleteForm::buildForm()
- 8.9.x core/lib/Drupal/Core/Entity/EntityDeleteForm.php \Drupal\Core\Entity\EntityDeleteForm::buildForm()
- 11.x core/lib/Drupal/Core/Entity/EntityDeleteForm.php \Drupal\Core\Entity\EntityDeleteForm::buildForm()
Overrides EntityConfirmFormBase::buildForm
6 calls to EntityDeleteForm::buildForm()
- BlockContentTypeDeleteForm::buildForm in core/
modules/ block_content/ src/ Form/ BlockContentTypeDeleteForm.php - Form constructor.
- CommentTypeDeleteForm::buildForm in core/
modules/ comment/ src/ Form/ CommentTypeDeleteForm.php - Form constructor.
- FieldConfigDeleteForm::buildForm in core/
modules/ field_ui/ src/ Form/ FieldConfigDeleteForm.php - Form constructor.
- MediaTypeDeleteConfirmForm::buildForm in core/
modules/ media/ src/ Form/ MediaTypeDeleteConfirmForm.php - Form constructor.
- NodeTypeDeleteConfirm::buildForm in core/
modules/ node/ src/ Form/ NodeTypeDeleteConfirm.php - Form constructor.
6 methods override EntityDeleteForm::buildForm()
- BlockContentTypeDeleteForm::buildForm in core/
modules/ block_content/ src/ Form/ BlockContentTypeDeleteForm.php - Form constructor.
- CommentTypeDeleteForm::buildForm in core/
modules/ comment/ src/ Form/ CommentTypeDeleteForm.php - Form constructor.
- FieldConfigDeleteForm::buildForm in core/
modules/ field_ui/ src/ Form/ FieldConfigDeleteForm.php - Form constructor.
- MediaTypeDeleteConfirmForm::buildForm in core/
modules/ media/ src/ Form/ MediaTypeDeleteConfirmForm.php - Form constructor.
- NodeTypeDeleteConfirm::buildForm in core/
modules/ node/ src/ Form/ NodeTypeDeleteConfirm.php - Form constructor.
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityDeleteForm.php, line 20
Class
- EntityDeleteForm
- Provides a generic base class for an entity deletion form.
Namespace
Drupal\Core\EntityCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
$entity = $this->getEntity();
// Only do dependency processing for configuration entities. Whilst it is
// possible for a configuration entity to be dependent on a content entity,
// these dependencies are soft and content delete permissions are often
// given to more users. This method should not make assumptions that $entity
// is a configuration entity in case we decide to remove the following
// condition.
if (!$entity instanceof ConfigEntityInterface) {
return $form;
}
$this->addDependencyListsToForm($form, $entity->getConfigDependencyKey(), $this->getConfigNamesToDelete($entity), $this->getConfigManager(), $this->entityTypeManager);
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.