64 lines
1.6 KiB
PHP
64 lines
1.6 KiB
PHP
<?php
|
|
|
|
/**
|
|
* SOTESHOP/stProductOptionsPlugin
|
|
* Ten plik należy do aplikacji stProductOptionsPlugin opartej na licencji (Open License SOTE) Otwarta Licencja SOTE.
|
|
* Nie zmieniaj tego pliku, jeśli chcesz korzystać z automatycznych aktualizacji oprogramowania.
|
|
* Jeśli chcesz wprowadzać swoje modyfikacje do programu, zapoznaj się z dokumentacją, jak zmieniać
|
|
* oprogramowanie bez zmiany kodu bazowego http://www.sote.pl/modifications
|
|
*
|
|
* @author Daniel Mendalka <daniel.mendalka@sote.pl>
|
|
*
|
|
* @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');
|
|
}
|
|
}
|