/** * The function returns connected Object to Article. * * @access public * @return object The connected Object. */ public function getObject() { if ($this->Layout == self::PAGE) { $Page = new Content_Page(); return $Page->findItem(array('Id = ' . $this->RefId)); } if ($this->Layout == self::PRODUCT) { $Product = new Product(); return $Product->findItem(array('Id = ' . $this->RefId)); } $Object = new stdClass(); $Object->Name = ''; return $Object; }
/** * The function returns connected object to current Router. * * @access public * @return object The object. */ public function getReference() { $Object = new Content_Page(); return $Object->findItem(array('Id = ' . $this->PageId)); }