public static function getViewId() { if (!App::getRegistry()->router) { // CLI compatibility return 0; } if (App::getRegistry()->router->getMode() == 0) { return Session::getActiveMainsideViewId(); } else { return Session::getActiveViewId(); } }
public function setLayerVariables() { if (App::getRegistry()->router == null) { // CLI compatibility return; } if (App::getRegistry()->router->getMode() == 0) { Session::setActiveMainsideViewId($this->registry->loader->getParam('idview')); } else { if (Session::getActiveViewId() !== NULL) { $viewid = Session::getActiveViewId(); } else { $viewid = 0; } Session::setActiveViewId($viewid); } }