/** * Get the product related to this item * * @param bool $blnNoCache * * @return \Isotope\Interfaces\IsotopeProduct|null */ public function getProduct($blnNoCache = false) { if (false === $this->objProduct || true === $blnNoCache) { $this->objProduct = null; /** @var \Isotope\Model\Product $strClass */ $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; }