8.3.x ConfigEntityBase.php public ConfigEntityBase::isNew()
8.0.x ConfigEntityBase.php public ConfigEntityBase::isNew()
8.1.x ConfigEntityBase.php public ConfigEntityBase::isNew()
8.2.x ConfigEntityBase.php public ConfigEntityBase::isNew()
8.4.x ConfigEntityBase.php public ConfigEntityBase::isNew()

Overrides Entity::isNew().

EntityInterface::enforceIsNew() is only supported for newly created configuration entities but has no effect after saving, since each configuration entity is unique.

Overrides Entity::isNew

5 calls to ConfigEntityBase::isNew()
BaseFieldOverride::preSave in core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php
ConfigEntityBase::preSave in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
Acts on an entity before the presave hook is invoked.
ConfigEntityBundleBase::preSave in core/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php
Acts on an entity before the presave hook is invoked.
FieldConfig::preSave in core/modules/field/src/Entity/FieldConfig.php
Overrides \Drupal\Core\Entity\Entity::preSave().
FieldStorageConfig::preSave in core/modules/field/src/Entity/FieldStorageConfig.php
Overrides \Drupal\Core\Entity\Entity::preSave().

File

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

Class

ConfigEntityBase
Defines a base configuration entity class.

Namespace

Drupal\Core\Config\Entity

Code

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