You are here

public function EntityDrupalWrapper::clear in Entity API 7

Overridden.

Overrides EntityStructureWrapper::clear

1 call to EntityDrupalWrapper::clear()
EntityDrupalWrapper::set in includes/entity.wrapper.inc
Overridden to support setting the entity by either the object or the id.

File

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

Class

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

Code

public function clear() {
  $this->id = NULL;
  $this->bundle = isset($this->info['bundle']) ? $this->info['bundle'] : NULL;
  if ($this->type != $this->info['type']) {

    // Reset entity info / property info based upon the info provided during
    // the creation of the wrapper.
    $this->type = $this->info['type'];
    $this
      ->setUp();
  }
  parent::clear();
}