maison_alexandra/www/system-brs-core/sys/sysEmpty/sysEmpty.php

79 lines
2.0 KiB
PHP

<?php
namespace BRSystems\Core\Sys\sysEmpty;
use BRSystems\Core\Library\cJSON\cJSON;
use BRSystems\Core\Sys\sysEmpty\inc\sysEmptyController;
/**
* sysEmpty
*
* @category sysEmpty
* @author Mareks Keišs <mareks.keiss@brsystems.lv>
* @since Version 1.0
*/
class sysEmpty {
public $DIR;
public $uriData;
public $controller;
/**
* Class constructor
*/
public function __construct($uriData) {
$this->uriData = $uriData;
$this->DIR = __DIR__ ? __DIR__ : dirname(__FILE__);
$this->controller = new sysEmptyController($this->uriData, $this->DIR, basename($this->DIR));
}
/**
* Default function to run
* Skip if other callback defined
*/
public function run() {
$this->controller->run();
}
public function pluginsAction() {
$action = getV('action');
$this->controller->oView->DISABLE_LEFT_MENU = true;
if($action){
switch ($action) {
case 'loadPlugin':
$this->controller->loadPluginData(getP('id'));
break;
case 'selfLoad': // load plugin page blank
cJSON::sendOk($this->controller->loadPluginPageData());
break;
case 'getUsersOnline':
cJSON::sendOk($this->controller->getUsersOnline());
break;
case 'savePositions':
$this->controller->savePortletPositions(getP('positions'));
break;
case 'saveBoxLayout':
$this->controller->savePortletBoxState(getP('position'));
break;
default:
$this->controller->pluginsAction();
break;
}
}else{
$this->controller->pluginsAction();
}
}
public function pageNotFoundAction() {
$this->controller->displayPageNotFound();
}
}