<?php
namespace Modules\Authenticate\Providers\Azure\Config; class Controller extends \App\Mvc\Controller\Form\PopupAbstract { protected function getDefaultFormData($R) { return [ 'clientId' => \Modules\Authenticate\Providers\Azure\Config::getInstance()->get('clientId'), 'clientSecret' => \Modules\Authenticate\Providers\Azure\Config::getInstance()->get('clientSecret'), ]; } protected function processFormData(array $R, \App\MessagesCollector $msgs) { try { $varsObj = \Modules\Authenticate\Providers\Azure\Config::getAdmin(); $varsObj->set('clientId', $R['clientId']); $varsObj->set('clientSecret', $R['clientSecret']); $varsObj->save(); $msgs->addSuccess($this->lang['index']['form']['success']['save']); return true; } catch (\App\Config\MessageException $ex) { $msgs->addError($ex->getMessage()); } return false; } }