1 entity.controller.inc public EntityDatabaseStorageController::create(array $values)

Implements EntityStorageControllerInterface::create().

Overrides EntityStorageControllerInterface::create

File

core/modules/entity/entity.controller.inc, line 705
Entity API controller classes and interface.

Class

EntityDatabaseStorageController
Implements the entity storage controller interface for the database.

Code

public function create(array $values) {
  $class = isset($this->entityInfo['entity class']) ? $this->entityInfo['entity class'] : NULL;
  if (empty($class)) {
    throw new EntityMalformedException(t('Missing "entity class" property on @entity_type entity.', array('@entity_type' => $this->entityType)));
  }
  return new $class($values);
}