8.5.x ConfigEntityBase.php ConfigEntityBase::isNew()
8.0.x ConfigEntityBase.php ConfigEntityBase::isNew()
8.1.x ConfigEntityBase.php ConfigEntityBase::isNew()
8.2.x ConfigEntityBase.php ConfigEntityBase::isNew()
8.3.x ConfigEntityBase.php ConfigEntityBase::isNew()
8.4.x ConfigEntityBase.php ConfigEntityBase::isNew()
8.6.x ConfigEntityBase.php 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

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);
}