function executeLater_deleteModule($oldState)
 {
     if (strtolower(__Request::get('action', '')) == 'next') {
         $pageType = $this->_parent->_application->getPageType();
         list($moduleName) = explode('.', $pageType);
         __Session::set('mbTable', $moduleName);
         glz_import('movio.modules.modulesBuilder.builder.*', array('Builder.php', 'AbstractCommand.php'));
         $builder = org_glizy_ObjectFactory::createObject('movio.modules.modulesBuilder.builder.Builder');
         $builder->executeDelete();
         glz_import('org.glizy.helpers.Navigation');
         org_glizy_helpers_Navigation::gotoUrl(__Link::makeUrl('link', array('pageId' => 'SiteMap')));
     }
 }
예제 #2
0
파일: State.php 프로젝트: GruppoMeta/Movio
 function deferredChildCreation($force = false)
 {
     if ($this->isCurrentState() || $force) {
         // aggiunge i figli
         if (!count($this->childComponents)) {
             $function = 'addChild_' . $this->getId();
             $function($this->_application, $this);
             $this->initChilds();
             $this->execDoLater();
         }
         if ($this->getAttribute('backUrl')) {
             __Session::set('__backUrl__', __Request::get('__backUrl__'));
         }
     }
 }
예제 #3
0
 function getItems()
 {
     $oldCacheValue = __Config::get('QUERY_CACHING');
     __Config::set('QUERY_CACHING', $this->getAttribute('cache'));
     if (is_null($this->iterator)) {
         $this->process();
     }
     $items = org_glizy_ObjectValues::get('org.glizy.components.DataDictionary', $this->getAttribute('recordClassName') . '.' . $this->getAttribute('field') . $this->getAttribute('query'));
     if (is_null($items)) {
         $items = __Session::get($this->getAttribute('recordClassName') . '.' . $this->getAttribute('field') . $this->getAttribute('query'));
     }
     if (is_null($items)) {
         $items = $this->loadDictionary($this->getAttribute('field'), $this->getAttribute('query'), unserialize($this->getAttribute('queryParams')), $this->getAttribute('skipEmpty'), $this->getAttribute('delimiter'));
         org_glizy_ObjectValues::set('org.glizy.components.DataDictionary', $this->getAttribute('recordClassName') . '.' . $this->getAttribute('field') . $this->getAttribute('query'), $items);
         if ($this->getAttribute('delimiter') != '') {
             __Session::set($this->getAttribute('recordClassName') . '.' . $this->getAttribute('field') . $this->getAttribute('query'), $items);
         }
     }
     __Config::set('QUERY_CACHING', $oldCacheValue);
     return $items;
 }
예제 #4
0
 function setValuesForNextRefresh($values)
 {
     __Session::set('__valuesForNextRefresh', $values);
 }
예제 #5
0
 function _initSiteMap($forceReload = false)
 {
     $this->log("initSiteMap", GLZ_LOG_SYSTEM);
     $this->siteMap =& org_glizy_ObjectFactory::createObject('org.glizycms.core.application.SiteMapDB');
     $this->siteMap->getSiteArray($forceReload);
     // controlla se l'utente ha i permessi per modificare la pagina
     // per velocizzare vengono precaricate tutte le relazioni in memoria
     $this->_aclPage = array();
     if (__Config::get('ACL_ENABLED')) {
         $this->_aclPage = __Session::get('glizy.aclFront', NULL);
         if (is_null($this->_aclPage)) {
             $this->_aclPage = array();
             $it = org_glizy_ObjectFactory::createModelIterator('org.glizy.models.Join', 'all', array('filters' => array('join_objectName' => 'menus_tbl#rel_aclFront')));
             foreach ($it as $arC) {
                 if (!isset($this->_aclPage[$arC->join_FK_source_id])) {
                     $this->_aclPage[$arC->join_FK_source_id] = array();
                 }
                 $this->_aclPage[$arC->join_FK_source_id][] = $arC->join_FK_dest_id;
             }
             // scorre tutti i menù per attribuire l'acl ai menù che non ce l'hanno
             // ereditandola dal padre
             $siteMapIterator =& org_glizy_ObjectFactory::createObject('org.glizy.application.SiteMapIterator', $this->siteMap);
             while (!$siteMapIterator->EOF) {
                 $n = $siteMapIterator->getNode();
                 $siteMapIterator->moveNext();
                 if (!isset($this->_aclPage[$n->id])) {
                     $n2 = $n;
                     while (true) {
                         if ($n2->parentId == 0) {
                             break;
                         }
                         $parentNode = $n2->parentNode();
                         $n2 = $parentNode;
                         if (isset($this->_aclPage[$parentNode->id])) {
                             $this->_aclPage[$n->id] = $this->_aclPage[$parentNode->id];
                             break;
                         }
                     }
                 }
             }
             __Session::set('glizy.aclFront', $this->_aclPage);
         }
     }
 }
예제 #6
0
 private function addTranslateInfo($target, $label, $buttonValue)
 {
     $infoName = '__translateInfo_' . strtolower($this->_application->getPageId());
     $translateInfo = __Session::get($infoName, array());
     $newTranslateInfo = array();
     foreach ($translateInfo as $value) {
         if ($value['target_name'] != $this->getOriginalId()) {
             $newTranslateInfo[] = $value;
         }
     }
     $newTranslateInfo[] = array('target_name' => $this->getOriginalId(), 'target' => $target, 'label' => $label, 'value' => $buttonValue);
     __Session::set($infoName, $newTranslateInfo);
 }