| Total Complexity | 5 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class FormYandexConnect extends Model |
||
| 15 | { |
||
| 16 | public $callback; |
||
| 17 | public $appid; |
||
| 18 | |||
| 19 | private $_configs; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * FormYandexConnect constructor. |
||
| 23 | * @param array $configs |
||
| 24 | */ |
||
| 25 | public function __construct(array $configs) |
||
| 26 | { |
||
| 27 | $this->_configs = $configs; |
||
| 28 | parent::__construct(false); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Process before features |
||
| 33 | */ |
||
| 34 | public function before() |
||
| 35 | { |
||
| 36 | $this->appid = $this->_configs['oauth']['app_id']; |
||
| 37 | $this->callback = Url::to('main/yandextoken'); |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Display labels |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | public function labels(): array |
||
| 49 | ]; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return array |
||
| 54 | */ |
||
| 55 | public function rules(): array |
||
| 60 | ]; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Make save configs |
||
| 65 | */ |
||
| 66 | public function make() |
||
| 72 | } |
||
| 73 | } |