1 entity.class.inc | public Entity::isNew() |
Implements EntityInterface::isNew().
Overrides EntityInterface::isNew
File
- core/
modules/ entity/ entity.class.inc, line 265 - 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();
}