PluginProbe
CSS & JavaScript Toolbox / 8.1
CSS & JavaScript Toolbox v8.1
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 / access.points / installer.accesspoint.php

installer.accesspoint.php in CSS & JavaScript Toolbox 8.1, at access.points/installer.accesspoint.php

86 lines 1.7 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 /**
10 *
11 */
12 class CJTInstallerAccessPoint extends CJTAccessPoint {
13
14 /**
15 * put your comment there...
16 *
17 * @var mixed
18 */
19 protected $stopNotices = false;
20
21 /**
22 * put your comment there...
23 *
24 */
25 public function __construct() {
26 // Initialize parent.
27 parent::__construct();
28 // Set name!
29 $this->name = 'installer';
30 }
31 /**
32 * put your comment there...
33 *
34 */
35 protected function doListen() {
36 // If not installed and not in manage page display admin notice!
37 if (!CJTPlugin::getInstance()->isInstalled() && $this->hasAccess()) {
38 add_action('admin_notices', array(&$this, 'notInstalledAdminNotice'));
39 }
40 }
41
42 /**
43 * put your comment there...
44 *
45 */
46 public function installationPage() {
47 if ($this->hasAccess()) {
48 // Set as connected object!
49 $this->connected();
50 // Set controller internal parameters.
51 return $this->route(null, array('view' => 'installer/install'))
52 // Set Action
53 ->setAction('install');
54 }
55 }
56
57 /**
58 * put your comment there...
59 *
60 */
61 public function notInstalledAdminNotice() {
62 // Show Not installed admin notice only
63 // if there is no access point processed/connected the request
64 if (!$this->stopNotices) {
65 // Set MVC request parameters.
66 $this->route(null , array('view' => 'installer/notice'))
67 // Set action name.
68 ->setAction('notInstalledNotice')
69 // Fire action!
70 ->_doAction();
71 }
72 }
73
74 /**
75 * put your comment there...
76 *
77 */
78 public function stopNotices() {
79 // Do not show admin notcies!
80 $this->stopNotices = true;
81 }
82
83 } // End class.
84
85 // Hookable!
86 CJTInstallerAccessPoint::define('CJTInstallerAccessPoint', array('hookType' => CJTWordpressEvents::HOOK_FILTER));