/** * Sets preloaded info from an existing item to the current content. * * @param vBCms_Item_Content $node */ public function castFrom(vB_Item_Content $source) { if ($this->use_item) { $this->assertContent(); $source->castInfo($this->content); } }
/** * Copies info from this object to another of the same type. * This is usefull when using a generic collection class that used a parent type * to fetch the items. * * @param vBCms_Item_Content $target */ public function castInfo(vBCms_Item_Content $target) { parent::castInfo($target); $target->setConfig($this->config); $target->setParents($this->parents); //There isn't a good way to pass the loaded, so I have to do this if we loaded //from cache. There should be a better way; if ($this->cached_data AND $this->nodeid) { $target->setInfo(array('nodeid' => $this->nodeid), $this->cached_data); } }