*/ /** * Klasa stEcardBackendActions * * @package stEcardPlugin * @subpackage actions */ class stEcardBackendActions extends stActions { /** * Wyświetla konfigurację modułu */ public function executeIndex() { $this->config = stConfig::getInstance($this->getContext()); $i18n = $this->getContext()->getI18N(); if ($this->getRequest()->getMethod() == sfRequest::POST) { $this->config->setFromRequest('ecard'); $this->config->save(); $this->setFlash('notice', $i18n->__('Twoje zmiany zostały zapisane', null, 'stAdminGeneratorPlugin')); } $this->labels = $this->getLabels(); $this->config->load(); } public function validateIndex() { if ($this->getRequest()->getMethod() == sfRequest::POST) { stAuthUsersListener::checkModificationCredentials($this, $this->getRequest(), $this->getModuleName()); } return true; } /** * Akcja w przypadku błędu w uzupełnianiu pól */ public function handleErrorIndex() { $this->config = stConfig::getInstance($this->getContext()); $this->labels = $this->getLabels(); return sfView::SUCCESS; } protected function getLabels() { return array('ecard{ecard_id}' => 'Identyfikator', 'ecard{ecard_password}' => 'Hasło autoryzacji'); } }