/** * The function returns Product attached to current Gallery. * * @access public * @return object The Product. */ public function getProduct() { $Product = new Product(); return $Product->findItem(array('Id = ' . $this->ProductId)); }
/** * 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; }