本文整理汇总了PHP中Innomatic\Core\InnomaticContainer::abort方法的典型用法代码示例。如果您正苦于以下问题:PHP InnomaticContainer::abort方法的具体用法?PHP InnomaticContainer::abort怎么用?PHP InnomaticContainer::abort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Innomatic\Core\InnomaticContainer
的用法示例。
在下文中一共展示了InnomaticContainer::abort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeDomain
/**
* Launches a panel in the domain desktop.
*
* If the panel name is one "main" then
* no real panel is launched, a domain desktop layout file is included.
*
* Domain desktop layout files are stored in the folder
* core/classes/innomatic/desktop/layout/domain.
*
* @param string $resource Panel name.
*/
public function executeDomain($resource)
{
// Check if this is the default page and if the user is allowed to access the dashboard
if (substr($resource, -1, 1) == '/') {
$perm = new \Innomatic\Desktop\Auth\DesktopPanelAuthorizator($this->container->getCurrentDomain()->getDataAccess(), $this->container->getCurrentUser()->getGroup());
$node_id = $perm->getNodeIdFromFileName('dashboard');
if ($perm->check($node_id, \Innomatic\Desktop\Auth\DesktopPanelAuthorizator::NODETYPE_PAGE) != \Innomatic\Desktop\Auth\DesktopPanelAuthorizator::NODE_NOTENABLED) {
$resource = $resource . 'dashboard';
}
}
if (substr($resource, -1, 1) != '/') {
// Must exit if the user called a page for which he isn't enabled
//
if (!isset($perm)) {
$perm = new \Innomatic\Desktop\Auth\DesktopPanelAuthorizator($this->container->getCurrentDomain()->getDataAccess(), $this->container->getCurrentUser()->getGroup());
}
$desktopPanel = basename($resource);
if ($this->container->getState() == \Innomatic\Core\InnomaticContainer::STATE_DEBUG) {
$dump = \Innomatic\Debug\InnomaticDump::instance('\\Innomatic\\Debug\\InnomaticDump');
$dump->desktopApplication = $desktopPanel;
$dump->sessionId = $this->session->getId();
}
switch ($desktopPanel) {
case 'index':
break;
default:
$node_id = $perm->getNodeIdFromFileName($desktopPanel);
if ($node_id) {
if ($perm->check($node_id, \Innomatic\Desktop\Auth\DesktopPanelAuthorizator::NODETYPE_PAGE) == \Innomatic\Desktop\Auth\DesktopPanelAuthorizator::NODE_NOTENABLED) {
$adloc = new \Innomatic\Locale\LocaleCatalog('innomatic::authentication', $this->container->getCurrentUser()->getLanguage());
$this->container->abort($adloc->getStr('nopageauth'));
}
} else {
$adloc = new \Innomatic\Locale\LocaleCatalog('innomatic::authentication', $this->container->getCurrentUser()->getLanguage());
$this->container->abort($adloc->getStr('nopageauth'));
}
}
if (is_dir($resource . '-panel')) {
$panelHome = $resource . '-panel/';
$panelName = basename($resource);
$controllerClassName = ucfirst($panelName) . 'PanelController';
// Checks if view file and definition exist
if (!(include_once $panelHome . $controllerClassName . '.php')) {
throw new \Innomatic\Wui\WuiException(\Innomatic\Wui\WuiException::MISSING_CONTROLLER_FILE);
}
if (!class_exists($controllerClassName, true)) {
throw new \Innomatic\Wui\WuiException(\Innomatic\Wui\WuiException::MISSING_CONTROLLER_CLASS);
}
$controller = new $controllerClassName(\Innomatic\Core\InnomaticContainer::MODE_DOMAIN, $panelName);
$this->container->setPanelController($controller);
} else {
switch ($desktopPanel) {
case 'menu':
include 'innomatic/desktop/layout/domain/' . $desktopPanel . '.php';
break;
default:
include $resource . '.php';
}
}
} else {
if (strlen($this->session->get('INNOMATIC_AUTH_USER'))) {
\Innomatic\Webapp\WebAppContainer::instance('\\Innomatic\\Webapp\\WebAppContainer')->getProcessor()->getResponse()->addHeader('P3P', 'CP="CUR ADM OUR NOR STA NID"');
include 'innomatic/desktop/layout/domain/index.php';
}
}
}