public function Entity::isNew

Implements \Drupal\Core\Entity\EntityInterface::isNew().

Overrides EntityInterface::isNew

2 calls to Entity::isNew()
Entity::delete in drupal/core/lib/Drupal/Core/Entity/Entity.php
Implements \Drupal\Core\Entity\EntityInterface::delete().
EntityNG::isEmpty in drupal/core/lib/Drupal/Core/Entity/EntityNG.php
Implements \Drupal\Core\TypedData\ComplexDataInterface::isEmpty().
1 method overrides Entity::isNew()
ConfigEntityBase::isNew in drupal/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
Overrides Entity::isNew().

File

drupal/core/lib/Drupal/Core/Entity/Entity.php, line 96
Contains \Drupal\Core\Entity\Entity.

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

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