* * @package stProductOptionsPlugin * @subpackage libs */ class ProductOptionsTemplate extends BaseProductOptionsTemplate { protected $culture; public function getAdminGeneratorTitle() { return $this->getOptName(); } public function getCulture() { return $this->culture; } public function setCulture($culture) { $this->culture = $culture; } public function save($con = null) { $isNew = $this->isNew(); $ret = parent::save($con); if ($isNew) { $root = new ProductOptionsDefaultValue(); $root->setProductOptionsTemplate($this); $root->makeRoot(); $root->save(); } $this->cacheClear(); return $ret; } public function delete($con = null) { $ret = parent::delete($con); $this->cacheClear(); return $ret; } public function cacheClear() { $fc = stFunctionCache::getInstance('stProductOptions'); $fc->removeById('templates'); } }