| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | trait system { |
||
| 14 | protected static $system_options_keys = [ |
||
| 15 | 'site_mode', |
||
| 16 | 'closed_title', |
||
| 17 | 'closed_text', |
||
| 18 | 'title_delimiter', |
||
| 19 | 'title_reverse', |
||
| 20 | 'simple_admin_mode' |
||
| 21 | ]; |
||
| 22 | /** |
||
| 23 | * Get system settings |
||
| 24 | * |
||
| 25 | * @return array |
||
| 26 | */ |
||
| 27 | public static function admin_system_get_settings () { |
||
| 28 | $Config = Config::instance(); |
||
| 29 | return $Config->core(static::$system_options_keys) + [ |
||
| 30 | 'applied' => $Config->cancel_available() |
||
| 31 | ]; |
||
| 32 | } |
||
| 33 | /** |
||
| 34 | * Apply system settings |
||
| 35 | * |
||
| 36 | * @param \cs\Request $Request |
||
| 37 | * |
||
| 38 | * @throws \cs\ExitException |
||
| 39 | */ |
||
| 40 | public static function admin_system_apply_settings ($Request) { |
||
| 41 | static::admin_core_options_apply($Request, static::$system_options_keys); |
||
| 42 | } |
||
| 43 | /** |
||
| 44 | * Save system settings |
||
| 45 | * |
||
| 46 | * @param \cs\Request $Request |
||
| 47 | * |
||
| 48 | * @throws \cs\ExitException |
||
| 49 | */ |
||
| 50 | public static function admin_system_save_settings ($Request) { |
||
| 52 | } |
||
| 53 | /** |
||
| 54 | * Cancel system settings |
||
| 55 | * |
||
| 56 | * @throws \cs\ExitException |
||
| 57 | */ |
||
| 58 | public static function admin_system_cancel_settings () { |
||
| 60 | } |
||
| 61 | } |
||
| 62 |