/** * Process * * @return boolean false if the process is aborted * @access public */ function process() { if (!$this->_application->canViewPage()) { org_glizy_Session::set('glizy.loginUrl', org_glizy_helpers_Link::scriptUrl()); org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('accessDenied')); } $this->processChilds(); }
protected function processResult($result) { $this->directOutput = true; if (is_array($result) && $result['errors']) { return $result; } else { $application =& org_glizy_ObjectValues::get('org.glizy', 'application'); $url = org_glizy_helpers_Link::makeUrl($this->getRedirectUrl(), array('pageId' => $application->getPageId())); return array('url' => $url); } }
function render() { // $this->addOutputCode( org_glizy_helpers_JS::linkJSfile(__Paths::get('APPLICATION').'templates/js/bootstrap.min.js' ) ); $output = '<div class="btn-group">' . '<a class="btn dropdown-toggle action-link" data-toggle="dropdown" href="#">' . '<i class="icon-plus"></i> ' . $this->getAttribute('label') . '</a>' . '<ul class="dropdown-menu left forced-left-position">'; $routeUrl = $this->getAttribute('routeUrl'); $it = org_glizy_objectFactory::createModelIterator('movio.modules.ontologybuilder.models.Entity', 'all'); foreach ($it as $ar) { $params = array('entityTypeId' => $ar->getId()); $url = org_glizy_helpers_Link::makeUrl($routeUrl, $params); $output .= '<li><a href="' . $url . '">' . $ar->entity_name . '</a></li>'; } $output .= '</ul>' . '</div>'; $this->addOutputCode($output); }
protected function loadContentFromDB() { if (!$this->_application->canViewPage()) { //$this->setAttribute('templateFileName', 'accessDenaied' ); org_glizy_Session::set('glizy.loginUrl', org_glizy_helpers_Link::scriptUrl()); org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('accessDenied')); } // if ($this->_user->backEndAccess && org_glizy_Request::get( 'draft', '' ) == '1') // { // $versionStatus = 'DRAFT'; // } // TODO gestire lo stato PUBLISHED E DRAFT $contentProxy = org_glizy_ObjectFactory::createObject('org.glizycms.contents.models.proxy.ContentProxy'); $this->_content = $contentProxy->readContentFromMenu($this->_application->getPageId(), org_glizy_ObjectValues::get('org.glizy', 'languageId')); }
function process() { $allowGroups = $this->getAttribute('allowGroups') != '' ? explode(',', $this->getAttribute('allowGroups')) : array(); if ((!org_glizy_Session::get('glizy.userLogged') || !(count($allowGroups) ? in_array($this->_user->groupId, $allowGroups) : true)) && $this->getAttribute('enabled')) { if (org_glizy_helpers_Link::scriptUrl() != org_glizy_helpers_Link::makeUrl('link', array('pageId' => org_glizy_Config::get('START_PAGE')))) { if ($this->getAttribute('showErrorMessage')) { org_glizy_Session::set('glizy.loginError', org_glizy_locale_Locale::get('GLZ_LOGIN_NOACCESS')); } org_glizy_Session::set('glizy.loginUrl', __Request::get('__url__')); } org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('link', array('pageId' => $this->getAttribute('accessPageId')))); exit; } if ($this->getAttribute('checkAcl') && !$this->_user->acl($this->_application->getPageId(), 'visible')) { header('HTTP/1.0 403 Forbidden'); exit; } }
protected function makeUrl($pageId, $title) { return org_glizy_helpers_Link::makeUrl('link', array('pageId' => $pageId, 'title' => $title)); }
function changeStateUrl($newState = '', $amp = false) { if (is_null($this->getAttribute('targetPage'))) { return org_glizy_helpers_Link::makeUrl('linkChangeAction', array('pageId' => $this->_application->getPageId(), $this->actionName => $newState)); } else { return org_glizy_helpers_Link::makeUrl('link', array('pageId' => $this->getAttribute('targetPage')), array($this->actionName => $newState)); } }
protected function makeUrl($entityTypeId, $document_id) { return org_glizy_helpers_Link::makeUrl('showEntityDetail', array('entityTypeId' => $entityTypeId, 'document_id' => $document_id)); }
function goHere() { /** @var org_glizy_application_Application $application */ $application =& org_glizy_ObjectValues::get('org.glizy', 'application'); org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('link', array('pageId' => $application->getPageId()))); }
function getJSAction($action, $forceUrl = true) { $pageId = $this->_application->getPageId(); $targetPage = $this->getAttribute('targetPage'); if (!is_null($targetPage)) { $pageId = $this->getAttribute('targetPage'); } if ($forceUrl) { $url = '\'' . org_glizy_helpers_Link::makeUrl('link', array('pageId' => $pageId), array($this->_stateName => $action)) . '\''; } else { $url = '\'' . org_glizy_helpers_Link::addParams(array($this->_stateName => $action)) . '\''; } return $url; }
private function redirectAfterLogin() { $destPage = ''; $accessPageId = $this->getAttribute('accessPageId'); if ($accessPageId && $accessPageId != $this->_application->getPageId()) { $destPage = strpos($accessPageId, 'http') !== false ? $accessPageId : org_glizy_helpers_Link::makeUrl('link', array('pageId' => $this->getAttribute('accessPageId'))); } $url = org_glizy_Session::get('glizy.loginUrl', $destPage); if ($url) { org_glizy_Session::remove('glizy.loginUrl'); org_glizy_helpers_Navigation::gotoUrl($url); } }