getRequest()->getMethod() == sfRequest::POST) { $data = $this->getRequestParameter('config'); if (isset($data['shop_number']) && empty($data['shop_number'])) { $this->getRequest()->setError('config{shop_number}', 'Proszę uzupełnić pole.'); } } return !$this->getRequest()->hasErrors(); } protected function saveConfig() { $result = parent::saveConfig(); if ($this->config->get('enabled')) { stPaymentType::get(stSantanderRatyPaymentType::class)->getConfiguration()->enable(); } else { stPaymentType::get(stSantanderRatyPaymentType::class)->getConfiguration()->disable(); } return $result; } }