1.20.x entity.class.inc | public Entity::isNew() |
Implements EntityInterface::isNew().
Overrides EntityInterface::isNew
File
- modules/
entity/ entity.class.inc, line 235 - Provides an interface and a base class for entities.
Class
- Entity
- Defines a base entity class.
Code
public function isNew() {
// We support creating entities with pre-defined IDs to ease migrations.
// For that the "is_new" property may be set to TRUE.
return !empty($this->is_new) || !$this->id();
}