/**
  * put your comment there...
  * 
  */
 public function __construct()
 {
     // Initialize Access Point base!
     parent::__construct();
     // Set access point name!
     $this->name = 'metabox';
 }
Exemplo n.º 2
0
 /**
  * put your comment there...
  * 
  */
 public function __construct()
 {
     // initialize base!
     parent::__construct();
     // Set name!
     $this->name = 'tinymce';
 }
 /**
  * put your comment there...
  * 
  */
 public function route($loadView = null, $request = array('view' => 'extensions/plugins-list'))
 {
     // Set as connected object!
     $this->connected();
     // Load extensions view throughjt the default controller!
     parent::route($loadView, $request)->setAction('extensions')->_doAction();
 }
 /**
  * put your comment there...
  * 
  */
 public function route($loadView = null, $request = null)
 {
     // Initializing!
     $controller = false;
     // Controllers allowed to be Loaded if not installed
     $notInstalledAllowedControllers = array('installer', 'setup');
     // Veil access point unless CJT installed or the controller is installer (to allow instalaltion throught AJAX)!
     if (CJTPlugin::getInstance()->isInstalled() || in_array($this->controllerName, $notInstalledAllowedControllers)) {
         // Connected!
         $this->connected();
         // IF Module-Prefix passed THEN Point to correct Controller path
         if (isset($_REQUEST['cjtajaxmodule'])) {
             # try to get module associated to passed module
             $accessPointClassLoader = CJT_Framework_Autoload_Loader::autoLoad($_REQUEST['cjtajaxmodule']);
             if ($accessPointClassLoader) {
                 $this->overrideControllersPath = $accessPointClassLoader->getPath() . DIRECTORY_SEPARATOR . 'controllers';
                 $this->overrideControllersPrefix = $accessPointClassLoader->getPrefix();
             }
         }
         // Instantiate controller.
         $controller = parent::route($loadView, $request);
         // Dispatch the call as its originally requested from ajax action!
         $action = "wp_ajax_{$this->pageId}_{$_REQUEST['CJTAjaxAction']}";
         // Fire Ajax action.
         do_action($action);
     }
     return $controller;
 }
 /**
  * put your comment there...
  * 
  */
 public function __construct()
 {
     // Initialize parent.
     parent::__construct();
     // Set name!
     $this->name = 'installer';
 }
 /**
  * put your comment there...
  * 
  */
 public function __construct()
 {
     // Initialize Access Point base!
     parent::__construct();
     // Set access point name!
     $this->name = 'main';
     // Needed for calling from nuinstall static method!
     self::$instance = $this;
 }
Exemplo n.º 7
0
 /**
  * Initialize post controller.
  * 
  * @return void
  */
 public function __construct($_unused_hasView = null, $request = null)
 {
     // Initialize parent.
     parent::__construct(false, $request);
     // Initialize.
     $postId = $this->getRequestParameter('post');
     // Instantiate model object.
     $this->model = self::getModel('metabox', array($postId));
     // Don't regiter Ajax actions unless AAP (Ajax Access Point) is loaded!
     $connectedObject =& CJTAccessPoint::isConnected();
     if ($connectedObject && $connectedObject->getName() == 'ajax') {
         $this->registryAction('create');
         $this->registryAction('delete');
     } else {
         if ($this->model->doPost()) {
             // Add metabox.
             $this->showMetabox();
         }
     }
 }
 /**
  * put your comment there...
  * 
  */
 public function route($loadView = false, $request = null)
 {
     // Load Auto Upgrade controller!
     $this->controllerName = 'auto-upgrade';
     parent::route($loadView, $request)->setAction('enable')->_doAction();
 }
 /**
  * put your comment there...
  * 
  * @return Boolean TRUE if it wasn't connected! FALSE otherwise.
  */
 protected function connected()
 {
     // Do connect only if not connected yet
     if ($returns = !self::$connected) {
         // Fire connected event!
         $this->onconnected(true);
         // Set current instance as the connected object!
         self::$connected = $this;
     }
     return $returns;
 }
 /**
  * put your comment there...
  * 
  */
 public function route($loadView = false, $request = null)
 {
     // Load Auto Upgrade controller!
     $this->controllerName = 'default';
     parent::route($loadView, $request)->setAction('dashboardMetabox')->_doAction();
 }