getContext()->getI18N(); $this->config = stConfig::getInstance('appExtCodeBackend'); $this->config->setCulture($this->getRequestParameter('culture', stLanguage::getOptLanguage())); if ($this->getRequest()->getMethod() == sfRequest::POST) { $this->config->set('enable', $this->getRequestParameter('extcode[enable]')); $this->config->set('code', $this->getRequestParameter('extcode[code]'), true); $this->config->set('enable2', $this->getRequestParameter('extcode[enable2]')); $this->config->set('code2', $this->getRequestParameter('extcode[code2]'), true); $this->config->set('enable3', $this->getRequestParameter('extcode[enable3]')); $this->config->set('code3', $this->getRequestParameter('extcode[code3]'), true); $this->config->save(); stFastCacheManager::clearCache(); $this->setFlash('notice', $i18n->__('Twoje zmiany zostaƂy zapisane', null, 'stAdminGeneratorPlugin')); $this->redirect('appExtCodeBackend/index?culture=' . $this->getRequestParameter('culture', stLanguage::getOptLanguage())); } $this->config->load(); $this->getBreadcrumbs()->add($i18n->__('Konfiguracja', null, 'stAdminGeneratorPlugin')); } protected function getBreadcrumbs(){ if (null === $this->breadcrumbs){ $i18n = $this->getContext()->getI18N(); $this->breadcrumbs = parent::getBreadcrumbs(); $this->breadcrumbs->add($i18n->__('Dodatkowe kody'), '@appExtCodePlugin'); } return $this->breadcrumbs; } }