/** * Return model object to use * * @return \XLite\Model\Profile */ public function getModelObject() { $profile = parent::getModelObject(); // Reset profile if it's not valid if (!\XLite\Core\Auth::getInstance()->checkProfile($profile)) { $profile = \XLite\Model\CachingFactory::getObject(__METHOD__, '\\XLite\\Model\\Profile'); } return $profile; }
/** * Return model form object * * @param array $params Form constructor params OPTIONAL * * @return \XLite\View\Model\AModel|void */ public function getModelForm(array $params = array()) { $result = null; $class = $this->getModelFormClass(); if (isset($class)) { $result = \XLite\Model\CachingFactory::getObject(__METHOD__ . $class . (empty($params) ? '' : md5(serialize($params))), $class, $params); } return $result; }
/** * Clear some data * * @return void */ protected function clearDataOnStartup() { static::$controller = null; \XLite\Model\CachingFactory::clearCache(); }
/** * Run controller * * @param string $applicationId Cache key OPTIONAL * * @return void */ public function runController($applicationId = null) { return \XLite\Model\CachingFactory::getObjectFromCallback(__METHOD__ . $applicationId, $this->getApplication($applicationId), 'runController'); }
/** * Return model form object * * @param array $params Form constructor params OPTIONAL * * @return \XLite\View\Model\AModel|void */ public function getInventoryModelForm(array $params = array()) { $class = '\\XLite\\View\\Model\\InventoryTracking'; return \XLite\Model\CachingFactory::getObject(__METHOD__ . $class . (empty($params) ? '' : md5(serialize($params))), $class, $params); }
/** * Return model form object * * @param array $params Form constructor params OPTIONAL * * @return \XLite\View\Model\AModel */ protected function getAuctionIncModelForm(array $params = array()) { $class = 'XLite\\Module\\XC\\AuctionInc\\View\\Model\\ProductAuctionInc'; return \XLite\Model\CachingFactory::getObject(__METHOD__ . $class . (empty($params) ? '' : md5(serialize($params))), $class, $params); }
/** * Return model form object * * @param array $params Form constructor params OPTIONAL * * @return \XLite\View\Model\AModel|void */ public function getDetailsModelForm(array $params = array()) { $class = '\\XLite\\Module\\XC\\PitneyBowes\\View\\Model\\AdditionalDetails'; return \XLite\Model\CachingFactory::getObject(__METHOD__ . $class . (empty($params) ? '' : md5(serialize($params))), $class, $params); }