Example #1
0
 /**
  * Get the product related to this item
  * @return  \Isotope\Interfaces\IsotopeProduct|null
  */
 public function getProduct($blnNoCache = false)
 {
     if (false === $this->objProduct || true === $blnNoCache) {
         $this->objProduct = null;
         $strClass = Product::getClassForModelType($this->type);
         if ($strClass == '' || !class_exists($strClass)) {
             \System::log('Error creating product object of type "' . $this->type . '"', __METHOD__, TL_ERROR);
             return null;
         }
         $this->objProduct = $strClass::findByPk($this->product_id);
     }
     return $this->objProduct;
 }