public function ConfigEntityBase::status in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::status()
- 10 core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::status()
Returns whether the configuration entity is enabled.
Status implementations for configuration entities should follow these general rules:
- Status does not affect the loading of entities. I.e. Disabling configuration entities should only have UI/access implications.
- It should only take effect when a 'status' key is explicitly declared in the entity_keys info of a configuration entity's annotation data.
- Each entity implementation (entity/controller) is responsible for checking and managing the status.
Return value
bool Whether the entity is enabled or not.
Overrides ConfigEntityInterface::status
3 calls to ConfigEntityBase::status()
- Block::preSave in core/
modules/ block/ src/ Entity/ Block.php - Acts on an entity before the presave hook is invoked.
- SearchPage::isIndexable in core/
modules/ search/ src/ Entity/ SearchPage.php - Determines if this search page entity is indexable.
- View::postSave in core/
modules/ views/ src/ Entity/ View.php - Acts on a saved entity before the insert or update hook is invoked.
1 method overrides ConfigEntityBase::status()
- Workflow::status in core/
modules/ workflows/ src/ Entity/ Workflow.php - Returns whether the configuration entity is enabled.
File
- core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityBase.php, line 198
Class
- ConfigEntityBase
- Defines a base configuration entity class.
Namespace
Drupal\Core\Config\EntityCode
public function status() {
return !empty($this->status);
}