public function ConfigEntityBase::status

public 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

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php, line 203

Class

ConfigEntityBase
Defines a base configuration entity class.

Namespace

Drupal\Core\Config\Entity

Code

public function status() {
  return !empty($this->status);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Entity!ConfigEntityBase.php/function/ConfigEntityBase::status/8.1.x