You are here

protected function EntityDrupalWrapper::setUp in Entity API 7

4 calls to EntityDrupalWrapper::setUp()
EntityDrupalWrapper::clear in includes/entity.wrapper.inc
Overridden.
EntityDrupalWrapper::spotInfo in includes/entity.wrapper.inc
Used to lazy-load bundle info. So the wrapper can be loaded e.g. just for setting without the data being loaded.
EntityDrupalWrapper::__construct in includes/entity.wrapper.inc
Construct a new EntityDrupalWrapper object.
EntityDrupalWrapper::__wakeup in includes/entity.wrapper.inc

File

includes/entity.wrapper.inc, line 614
Provides wrappers allowing easy usage of the entity metadata.

Class

EntityDrupalWrapper
Provides a wrapper for entities registrered in hook_entity_info().

Code

protected function setUp() {
  $this->propertyInfo = entity_get_property_info($this->type) + array(
    'properties' => array(),
  );
  $info = $this->info + array(
    'property info' => array(),
    'bundle' => NULL,
  );
  $this->propertyInfo['properties'] += $info['property info'];
  $this->bundle = $info['bundle'];
  $this->entityInfo = entity_get_info($this->type);
  if (isset($this->bundle)) {
    $this
      ->spotBundleInfo(FALSE);
  }
}