PluginProbe
CSS & JavaScript Toolbox / 11.4
CSS & JavaScript Toolbox v11.4
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
css-javascript-toolbox / controllers / settings.php

settings.php in CSS & JavaScript Toolbox 11.4, at controllers/settings.php

69 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 */
5
6 // Disallow direct access.
7 defined('ABSPATH') or die("Access denied");
8
9 // import dependencies.
10 cssJSToolbox::import('framework:mvc:controller-ajax.inc.php');
11
12 /**
13 *
14 */
15 class CJTSettingsController extends CJTAjaxController {
16
17 /**
18 * put your comment there...
19 *
20 * @var mixed
21 */
22 protected $controllerInfo = array('model' => 'settings');
23
24 /**
25 * put your comment there...
26 *
27 */
28 public function __construct() {
29 parent::__construct();
30 // Actions.
31 $this->registryAction('manageForm');
32 $this->registryAction('save');
33 $this->registryAction('restoreDefault');
34 }
35
36 /**
37 * put your comment there...
38 *
39 */
40 public function manageFormAction() {
41 // Create settings view.
42 $view = self::getView('settings/manager');
43 // Push settings into the view.
44 $view->settings = $this->model;
45 // Output settings view.
46 $this->httpContentType = 'text/html';
47 $this->response = $view->getTemplate('settings');
48 }
49
50 /**
51 * put your comment there...
52 *
53 */
54 public function restoreDefaultAction() {
55
56 }
57
58 /**
59 * put your comment there...
60 *
61 */
62 public function saveAction() {
63 // Get settings page parameters.
64 $settings = filter_input(INPUT_POST, 'settings', FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY);
65 $this->model->save($settings);
66 $this->response = true;
67 }
68
69 } // End class.