1 entity.class.inc public Entity::__construct(array $values = array())

Constructs a new entity object.

Overrides EntityInterface::__construct

File

core/modules/entity/entity.class.inc, line 112
Provides an interface and a base class for entities.

Class

Entity
Defines a base entity class.

Code

public function __construct(array $values = array()) {
  // Set initial values.
  foreach ($values as $key => $value) {
    $this->$key = $value;
  }
}