function ConfigEntityInterface::isUninstalling
Same name in other branches
- 9 core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php \Drupal\Core\Config\Entity\ConfigEntityInterface::isUninstalling()
- 8.9.x core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php \Drupal\Core\Config\Entity\ConfigEntityInterface::isUninstalling()
- 11.x core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php \Drupal\Core\Config\Entity\ConfigEntityInterface::isUninstalling()
Returns whether this entity is being changed during the uninstall process.
If you are writing code that responds to a change in this entity (insert, update, delete, presave, etc.), and your code would result in a configuration change (whether related to this configuration entity, another configuration entity, or non-entity configuration) or your code would result in a change to this entity itself, you need to check and see if this entity change is part of an uninstall process, and skip executing your code if that is the case.
For example, \Drupal\language\Entity\ConfigurableLanguage::preDelete() prevents the API from deleting the default language. However during an uninstall of the language module it is expected that the default language should be deleted.
Return value
bool
2 methods override ConfigEntityInterface::isUninstalling()
- ConfigEntityBase::isUninstalling in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityBase.php - ViewUI::isUninstalling in core/
modules/ views_ui/ src/ ViewUI.php - Returns whether this entity is being changed during the uninstall process.
File
-
core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityInterface.php, line 75
Class
- ConfigEntityInterface
- Defines a common interface for configuration entities.
Namespace
Drupal\Core\Config\EntityCode
public function isUninstalling();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.