*/ /** * Klasa stDotpayBackendActions * * @package stDotpayPlugin * @subpackage actions */ class stDotpayBackendActions extends stActions { public function executeIndex() { $this->stDotpay = new stDotpay(); $i18n = $this->getContext()->getI18N(); $this->config = stConfig::getInstance($this->getContext(), array('culture' => $this->getRequestParameter('culture', stLanguage::getOptLanguage()))); if ($this->getRequest()->getMethod() == sfRequest::POST) { $this->config->setFromRequest('config'); $this->config->save(); $this->setFlash('notice', $i18n->__('Twoje zmiany zostały zapisane', null, 'stAdminGeneratorPlugin')); } $this->config->load(); $this->labels = $this->getLabels(); } public function validateIndex() { if ($this->getRequest()->getMethod() == sfRequest::POST) { stAuthUsersListener::checkModificationCredentials($this, $this->getRequest(), $this->getModuleName()); } return true; } public function handleErrorIndex() { $this->stDotpay = new stDotpay(); $this->config = stConfig::getInstance($this->getContext()); $this->labels = $this->getLabels(); return sfView::SUCCESS; } public function getLabels() { return array('config{dotpay_id}' => 'Identyfikator', 'config{pin}' => 'Numer PIN do weryfikacji płatności'); } }