コード例 #1
0
ファイル: PHP.php プロジェクト: GruppoMeta/Movio
 function apply(&$regionContent)
 {
     $this->checkRequiredValues($regionContent);
     foreach ($regionContent as $k => $v) {
         if (!isset(${$k})) {
             ${$k} = $v;
         } else {
             ${$k} .= $v;
         }
     }
     $compiler = org_glizy_ObjectFactory::createObject('org.glizy.compilers.LayoutManagerPHP');
     $compiledFileName = $compiler->verify($this->fileName);
     if ($compiledFileName === false) {
         $templateSource = @implode('', file($this->fileName));
         $templateSource = $this->fixUrl($templateSource);
         $compiledFileName = $compiler->compile($templateSource);
     }
     ob_start();
     include $compiledFileName;
     $templateSource = ob_get_contents();
     ob_end_clean();
     if (isset($regionContent['__body__'])) {
         $templateSource = $this->modifyBodyTag($regionContent['__body__'], $templateSource);
     }
     $templateSource = $this->fixLanguages($templateSource);
     return $templateSource;
 }
コード例 #2
0
ファイル: Logout.php プロジェクト: GruppoMeta/Movio
 public function execute()
 {
     $authClass = org_glizy_ObjectFactory::createObject(__Config::get('glizy.authentication'));
     $authClass->logout();
     org_glizy_helpers_Navigation::gotoUrl(GLZ_HOST);
     exit;
 }
コード例 #3
0
ファイル: 12ImportCsvData.php プロジェクト: GruppoMeta/Movio
 function execute()
 {
     if (__Request::get('mbModuleType') == 'csv') {
         $tableName = $this->parent->getTableName();
         $fields = __Request::get('fieldName');
         $modelName = 'userModules.' . $tableName . '.models.Model';
         $fieldsMap = array();
         foreach ($fields as $f) {
             $col = str_replace('row_', '', $f);
             $fieldsMap[] = array($f, $col);
         }
         $ar = org_glizy_ObjectFactory::createModel($modelName);
         $csvIterator = org_glizy_ObjectFactory::createObject('movio.modules.modulesBuilder.services.CVSImporter', __Request::get('mbCsvOptions'));
         foreach ($csvIterator as $row) {
             if ($f) {
                 $ar->emptyRecord();
                 foreach ($fieldsMap as $f) {
                     $ar->{$f[0]} = $row->{$f[1]};
                 }
                 $ar->publish();
             }
         }
     }
     return true;
 }
コード例 #4
0
ファイル: Template.php プロジェクト: GruppoMeta/Movio
 private function getTemplateDataFromCache($templateData)
 {
     $templateProxy = org_glizy_ObjectFactory::createObject('org.glizycms.template.models.proxy.TemplateProxy');
     // $templateProxy->invalidateCache();
     $cache = $templateProxy->getTemplateCache();
     $cssFileName = __Paths::get('CACHE') . md5($this->getClassName() . '_' . $templateData->__id) . '.css';
     $self = $this;
     $templateData = $cache->get($cssFileName, array(), function () use($self, $templateData, $cssFileName) {
         $newTemplateData = new StdClass();
         $newTemplateData->footerLogo = '';
         $self->updateTemplateData($templateData);
         $self->compileCss($templateData, $cssFileName);
         $templateData->footerLogo = @json_decode($templateData->footerLogo);
         if ($templateData->footerLogo && $templateData->footerLogo->id) {
             $image = org_glizy_helpers_Media::getImageById($templateData->footerLogo->id);
             if ($templateData->footerLogoLink) {
                 $image = __Link::formatLink($templateData->footerLogoLink, $templateData->footerLogoTitle, $image);
             }
             $newTemplateData->footerLogo = $image;
         }
         $newTemplateData->css = $templateData->css;
         return $newTemplateData;
     });
     return $templateData;
 }
コード例 #5
0
ファイル: Search.php プロジェクト: GruppoMeta/Movio
 function process()
 {
     if (!$this->_application->isAdmin()) {
         $this->_content = array();
         $this->_content['label'] = $this->getAttribute('label');
         $this->_content['buttonLabel'] = $this->getAttribute('buttonLabel');
         $this->_content['comment'] = $this->getAttribute('comment');
         $this->_content['comment1'] = org_glizy_locale_Locale::get('GLZ_SEARCH_RESULT');
         $this->_content['value'] = org_glizy_Request::get('search', '');
         $this->_content['result'] = null;
         // preg_match( '/"([^"]*)"/i', $this->_content['value'], $match );
         // if ( count( $match ) )
         // {
         //     $searchArray2 = array( $match[ 1 ] );
         // }
         // else
         // {
         //     if ($this->getAttribute('explodeWords')) {
         //         $searchArray = explode(' ', $this->_content['value']);
         //         $searchArray2 = array();
         //         foreach ($searchArray as $word)
         //         {
         //             if (strlen($word)>=3) $searchArray2[] = $word;
         //         }
         //     } else {
         //         $searchArray2 = $this->_content['value'];
         //     }
         // }
         if (strlen($this->_content['value']) >= 3) {
             $pluginObj =& org_glizy_ObjectFactory::createObject('org.glizy.plugins.Search');
             $this->_content['result'] = $pluginObj->run(array('search' => $this->_content['value'], 'languageId' => $this->_application->getLanguageId()));
         }
         $this->_content['total'] = org_glizy_locale_Locale::get('GLZ_SEARCH_RESULT_TOTAL') . ' ' . count($this->_content['result']);
     }
 }
コード例 #6
0
ファイル: Import.php プロジェクト: GruppoMeta/Movio
 public static function compile($compiler, &$node, &$registredNameSpaces, &$counter, $parent = 'NULL')
 {
     if ($node->hasAttribute('src')) {
         $src = $node->getAttribute('src');
         if (strpos($src, '.xml') === strlen($src) - 4) {
             $src = substr($src, 0, -4);
         }
         $pageType = org_glizy_ObjectFactory::resolvePageType($src) . '.xml';
         $path = $compiler->getPath();
         $fileName = $path . $pageType;
         if (!file_exists($fileName)) {
             $fileName = glz_findClassPath($src);
             if (is_null($fileName)) {
                 // TODO: file non trovato visualizzare errore
             }
         }
         $compiler2 = org_glizy_ObjectFactory::createObject('org.glizy.compilers.Component');
         $compiledFileName = $compiler2->verify($fileName);
         $className = GLZ_basename($compiledFileName);
         $componentId = $node->hasAttribute('id') ? $node->getAttribute('id') : '';
         $compiler->_classSource .= '// TAG: ' . $node->nodeName . ' ' . $node->getAttribute('src') . GLZ_COMPILER_NEWLINE2;
         $compiler->_classSource .= 'if (!$skipImport) {' . GLZ_COMPILER_NEWLINE2;
         $compiler->_classSource .= 'org_glizy_ObjectFactory::requireComponent(\'' . $compiledFileName . '\', \'' . addslashes($fileName) . '\')' . GLZ_COMPILER_NEWLINE;
         $compiler->_classSource .= '$n' . $counter . ' = new ' . $className . '($application, ' . $parent . ')' . GLZ_COMPILER_NEWLINE;
         $compiler->_classSource .= $parent . '->addChild($n' . $counter . ')' . GLZ_COMPILER_NEWLINE;
         $compiler->_classSource .= '}' . GLZ_COMPILER_NEWLINE;
     }
 }
コード例 #7
0
ファイル: Delete.php プロジェクト: GruppoMeta/Movio
 public function execute($menuId)
 {
     // TODO: CONTROLLO ACL
     $menuProxy = org_glizy_ObjectFactory::createObject('org.glizycms.contents.models.proxy.MenuProxy');
     $menuProxy->deleteMenu($menuId);
     return true;
 }
コード例 #8
0
ファイル: ShowResults.php プロジェクト: GruppoMeta/Movio
 function process()
 {
     $params = __Request::get('params');
     $query = json_decode($params, true);
     $paginateClass = $this->getComponentById('paginate');
     $paginateClass->setRecordsCount();
     $limits = $paginateClass->getLimits();
     $start = $limits['start'] + 1;
     $checkBoxEnable = $query['imgCheckBox'] === "checkBoxEnable";
     $rows = 18;
     $diff = 0;
     if ($query['maxResult'] && !$checkBoxEnable && $start + $rows > $query['maxResult']) {
         $rows = $query['maxResult'] - $start + 1;
         $diff = 18 - $rows;
     }
     $this->_content = array('id' => $this->getId(), 'records' => array(), 'error' => null, 'params' => $params, 'rows' => $rows, 'currentOffset' => $limits['start']);
     $request = org_glizy_ObjectFactory::createObject('movio.modules.europeana.SendRequest');
     $response = $request->execute($query, $start, $rows);
     if (!$response->error) {
         $this->_content['records'] = $response->records;
         if ($checkBoxEnable) {
             $this->_content['imgCheckBox'] = true;
             $total = $response->totalResults;
         } else {
             $this->_content['imgCheckBox'] = false;
             $total = $response->totalResults ? $query['maxResult'] : 0;
         }
     } else {
         $this->_content['error'] = $response->error;
     }
     $this->_content['imgList'] = $query['imgList'] ? $query['imgList'] : array();
     $paginateClass->setRecordsCount($total - $diff, $rows);
 }
コード例 #9
0
ファイル: MvcPage.php プロジェクト: GruppoMeta/Movio
 /**
  * Process
  *
  * @return	boolean	false if the process is aborted
  * @access	public
  */
 function process()
 {
     $acl = $this->getAttribute('acl');
     if (!empty($acl)) {
         list($service, $action) = explode(',', $acl);
         if (!$this->_user->acl($service, $action)) {
             $this->breakCycle();
             $this->addOutputCode("403 Forbidden");
             return;
         }
     }
     $this->loadContentFromDB();
     $this->loadTemplate();
     $this->sessionEx = org_glizy_ObjectFactory::createObject('org.glizy.SessionEx', $this->getId());
     $this->action = __Request::get($this->actionName);
     $oldAction = $this->sessionEx->get($this->actionName);
     foreach ($this->childComponents as $c) {
         if (is_a($c, 'org_glizy_mvc_components_State')) {
             $c->deferredChildCreation();
         }
     }
     $this->callController();
     $this->canCallController = true;
     $this->action = strtolower($this->action);
     $this->processChilds();
     $this->sessionEx->set($this->actionName, $oldAction);
 }
コード例 #10
0
ファイル: CSS.php プロジェクト: GruppoMeta/Movio
 private function includeFolder($folder)
 {
     // controlla se il file in cache è valido
     $options = array('cacheDir' => org_glizy_Paths::get('CACHE_CODE'), 'lifeTime' => org_glizy_Config::get('CACHE_CODE'), 'readControlType' => '', 'fileExtension' => '.css');
     $cacheSignature = get_class($this) . $folder;
     $cacheObj = org_glizy_ObjectFactory::createObject('org.glizy.cache.CacheFile', $options);
     $cssFileName = $cacheObj->verify($cacheSignature);
     if ($cssFileName === false) {
         $cssFile = '';
         if ($dir_handle = @opendir($folder)) {
             while ($file_name = readdir($dir_handle)) {
                 if ($file_name != "." && $file_name != ".." && !is_dir("{$dir}/{$file_name}")) {
                     $f[] = $file_name;
                 }
             }
             sort($f);
             closedir($dir_handle);
             foreach ($f as $element) {
                 $cssCode = file_get_contents($folder . '/' . $element);
                 $cssFile .= $cssCode . "\n";
             }
         }
         if (__Config::get('DEBUG') !== false) {
             $cacheObj->save($cssFile, NULL, get_class($this));
         } else {
             $cacheObj->save($cssFile, NULL, $cacheSignature);
         }
         $cssFileName = $cacheObj->getFileName();
     }
     return $cssFileName;
 }
コード例 #11
0
ファイル: Index.php プロジェクト: GruppoMeta/Movio
 public function execute()
 {
     $c = $this->view->getComponentById('dp');
     if (stripos($this->application->getPageId(), 'picker') !== false) {
         // picker
         $sessionEx = org_glizy_ObjectFactory::createObject('org.glizy.SessionEx', $c->getId());
         $mediaType = org_glizy_Request::get('mediaType', '');
         if (empty($mediaType)) {
             $mediaType = $sessionEx->get('mediaType', 'ALL', false, false);
         }
         if (!empty($mediaType) && strtoupper($mediaType) != 'ALL') {
             $sessionEx->set('mediaType', $mediaType, GLZ_SESSION_EX_PERSISTENT);
             $c->setAttribute('query', 'all' . ucfirst(strtolower(str_replace(',', '_', $mediaType))));
             // $this->setAttribute('filters', 'media_type IN (\''.str_replace(',', '\',\'',$mediaType).'\')');
         }
         if (stripos($this->application->getPageId(), 'tiny') !== false) {
             $this->setComponentsVisibility('buttonsBar', false);
         }
     } else {
         $query = str_replace('all', '', __Request::get('tabs_state', 'allMedia'));
         // $query = str_replace('mediaarchive_all', '', strtolower($this->application->getPageId()));
         if (empty($query) || $query == 'mediaarchive') {
             $query = 'media';
         }
         $query = 'all' . ucfirst($query);
         $c->setAttribute('query', $query);
     }
     // TODO  disabilitare il  pulsane aggiungi in base all'acl
 }
コード例 #12
0
ファイル: RecordDetail.php プロジェクト: GruppoMeta/Movio
 function process()
 {
     $this->recordId = org_glizy_Request::get($this->getAttribute('idName'), NULL);
     if (is_null($this->recordId)) {
         return;
     }
     $dataProvider =& $this->getAttribute('dataProvider');
     if ($dataProvider) {
         $this->ar = $dataProvider->load($this->recordId);
         $processCell = org_glizy_ObjectFactory::createObject($this->getAttribute('processCell'), $this->_application);
         if ($processCell) {
             $ar =& $this->ar;
             call_user_func_array(array($processCell, 'renderCell'), array($ar, $this->getAttribute('processCellParams')));
         }
         $this->_content = org_glizy_ObjectFactory::createObject('org.glizy.components.RecordDetailVO', $this->ar);
         $ogTitle = $this->getAttribute('ogTitle');
         if ($ogTitle) {
             org_glizy_ObjectValues::set('org.glizy.og', 'title', $this->ar->{$ogTitle});
             if ($this->getAttribute('modifyBreadcrumbs')) {
                 $evt = array('type' => GLZ_EVT_BREADCRUMBS_UPDATE, 'data' => $this->ar->{$ogTitle});
                 $this->dispatchEvent($evt);
                 $evt = array('type' => GLZ_EVT_PAGETITLE_UPDATE, 'data' => $this->ar->{$ogTitle});
                 $this->dispatchEvent($evt);
             }
         }
         // TODO controllare che i dati siano stati caricati correttamento
     } else {
         // TODO generare errore, dataprovider non valid
     }
     $this->_content->__url__ = !is_null($this->getAttribute('routeUrl')) ? org_glizy_helpers_Link::makeURL($this->getAttribute('routeUrl'), $this->_content) : '';
     parent::process();
 }
コード例 #13
0
ファイル: Acl.php プロジェクト: GruppoMeta/Movio
 function compile($options)
 {
     $this->initOutput();
     // esegue il parsing del file di configurazione
     $xml = org_glizy_ObjectFactory::createObject('org.glizy.parser.XML');
     $xml->loadAndParseNS($this->_fileName);
     $services = $xml->getElementsByTagName('AclService');
     $this->output .= '$acl = array();';
     foreach ($services as $service) {
         $name = strtolower($service->getAttribute('name'));
         $default = $service->hasAttribute('default') ? $service->getAttribute('default') : 'true';
         $this->output .= '$acl[\'' . $name . '\'] = array(\'default\' => ' . $default . ', \'rules\' => array(';
         $rules = $service->getElementsByTagName('AclAction');
         foreach ($rules as $rule) {
             $name = strtolower($rule->getAttribute('name'));
             $allowGroups = $rule->getAttribute('allowGroups');
             $allowGroups = !empty($allowGroups) ? 'array(\'' . str_replace(',', '\', \'', $allowGroups) . '\')' : 'array()';
             $allowUsers = $rule->getAttribute('allowUsers');
             $allowUsers = !empty($allowUsers) ? 'array(\'' . str_replace(',', '\', \'', $allowUsers) . '\')' : 'array()';
             $this->output .= '\'' . $name . '\' => array(\'allowGroups\' => ' . $allowGroups . ', \'allowUsers\' => ' . $allowUsers . '), ';
         }
         $this->output .= '))' . GLZ_COMPILER_NEWLINE;
     }
     return $this->save();
 }
コード例 #14
0
ファイル: Session.php プロジェクト: GruppoMeta/Movio
 static function start()
 {
     if (!org_glizy_Session::isStarted()) {
         $sessionStore = org_glizy_Config::get('glizy.session.store');
         $prefix = org_glizy_Config::get('SESSION_PREFIX');
         $timeout = org_glizy_Config::get('SESSION_TIMEOUT');
         if ($sessionStore) {
             $storagePrefix = org_glizy_Config::get('glizy.session.store.prefix');
             if (!$storagePrefix) {
                 $storagePrefix = 'PHPSESSID';
             }
             $store = org_glizy_ObjectFactory::createObject($sessionStore, $timeout, $storagePrefix . $prefix);
             if (!$store) {
                 throw new Exception('Session Store don\'t exists: ' . $sessionStore);
             }
             session_set_save_handler($store);
         }
         if (!isset($_SESSION)) {
             org_glizy_Session::glz_session_start();
         }
         if (isset($_SESSION[$prefix . 'sessionLastAction']) && time() - $_SESSION[$prefix . 'sessionLastAction'] > $timeout) {
             $_SESSION = array();
         }
         $_SESSION[$prefix . 'sessionStarted'] = true;
         $_SESSION[$prefix . 'sessionLastAction'] = time();
     }
 }
コード例 #15
0
ファイル: Save.php プロジェクト: GruppoMeta/Movio
 public function execute($data)
 {
     // TODO: controllo acl
     $templateProxy = org_glizy_ObjectFactory::createObject('org.glizycms.template.models.proxy.TemplateProxy');
     $templateProxy->saveEditData($data);
     return true;
 }
コード例 #16
0
ファイル: ListSets.php プロジェクト: GruppoMeta/Movio
 /**
  * Render
  *
  * @return	void
  * @access	public
  */
 function render($outputMode = NULL, $skipChilds = false)
 {
     $sets = $this->_application->getSets();
     if (!count($sets)) {
         $this->_application->setError('noSetHierarchy');
     } else {
         $metadataFormat = $this->_application->getMetadataFormat();
         $output = '<ListSets>';
         foreach ($sets as $v) {
             $setClass = org_glizy_ObjectFactory::createObject($v);
             if ($setClass) {
                 $info = $setClass->getSetInfo();
                 $output .= '<set>';
                 $output .= '<setSpec>' . org_glizy_oaipmh_OaiPmh::encode($info['setSpec']) . '</setSpec>';
                 $output .= '<setName>' . org_glizy_oaipmh_OaiPmh::encode($info['setName']) . '</setName>';
                 if (!empty($info['setDescription'])) {
                     $output .= '<setDescription>';
                     $output .= org_glizy_oaipmh_OaiPmh::openMetadataHeader($metadataFormat['oai_dc']);
                     $output .= '<dc:description>' . org_glizy_oaipmh_OaiPmh::encode($info['setDescription']) . '</dc:description>';
                     $output .= '<dc:creator>' . org_glizy_oaipmh_OaiPmh::encode($info['setCreator']) . '</dc:creator>';
                     $output .= org_glizy_oaipmh_OaiPmh::closeMetadataHeader($metadataFormat['oai_dc']);
                     $output .= '</setDescription>';
                 }
                 $output .= '</set>';
             }
         }
         $output .= '</ListSets>';
         $this->addOutputCode($output);
     }
 }
コード例 #17
0
 public function publish()
 {
     $exportPath = __Paths::get('CACHE') . 'export/';
     $mediaPath = $exportPath . 'media/';
     $zipPath = __Paths::get('BASE') . 'export/' . 'mobileContents.zip';
     org_glizy_helpers_Files::deleteDirectory($exportPath);
     @unlink($zipPath);
     @mkdir($exportPath);
     @mkdir($mediaPath);
     $exportService = org_glizy_ObjectFactory::createObject('movio.modules.publishApp.service.ExportService');
     $exportService->export();
     $medias = $exportService->getMedias();
     foreach ($medias as $id => $fileName) {
         $media = org_glizycms_mediaArchive_MediaManager::getMediaById($id);
         copy($media->getFileName(), $mediaPath . $fileName);
     }
     $dbHost = __Config::get('DB_HOST');
     $dbUser = __Config::get('DB_USER');
     $dbPass = __Config::get('DB_PSW');
     $dbName = __Config::get('DB_NAME');
     $tableName = __Config::get('movio.modules.publishApp.mobileContentsTable');
     $sqliteDb = $exportPath . __Config::get('movio.modules.publishApp.sqliteDbName');
     $mysql2SqliteService = org_glizy_ObjectFactory::createObject('movio.modules.publishApp.service.Mysql2SqliteService');
     $mysql2SqliteService->convert($dbHost, $dbUser, $dbPass, $dbName, $tableName, $sqliteDb);
     $this->createZip($exportPath, $zipPath);
     org_glizy_Registry::set('movio/modules/publishApp/lastUpdate', time());
 }
コード例 #18
0
ファイル: TemplateEdit.php プロジェクト: GruppoMeta/Movio
 public function process()
 {
     if ($this->getAttribute('global')) {
         $templateXml = 'TemplateAdminGlobal';
         $menuId = 0;
     } else {
         $templateXml = 'TemplateAdmin';
         $menuId = __Request::get('menuId', __Request::get('__id'));
         if (!$menuId) {
             // TODO ERRORE
         }
     }
     $templateProxy = org_glizy_ObjectFactory::createObject('org.glizycms.template.models.proxy.TemplateProxy');
     $templateName = $templateProxy->getSelectedTemplate();
     if (!$templateName) {
         // TODO ERRORE
     }
     $templateProxy->loadTemplateLocale();
     // legge i dati del template
     $data = $templateProxy->getEditDataForMenu($menuId, __Request::exists('loadFromParent'));
     $customTemplate = $templateProxy->getTemplateCustomClass();
     if ($customTemplate && method_exists($customTemplate, 'updateTemplateData')) {
         $customTemplate->updateTemplateData($data);
     }
     $this->setData($data);
     $this->addDefaultComponents();
     $templateRealPath = $templateProxy->getTemplateRealpath();
     if ($templateRealPath) {
         org_glizy_ObjectFactory::attachPageToComponent($this, $this->_application, $templateXml, $templateRealPath . '/', array('idPrefix' => $this->getId() . '-', 'skipImport' => true, 'mode' => 'edit'), $this->getId() . '-');
         parent::process();
         // TODO visualizzare che non ci sono parametri di personalizzazione
     }
 }
コード例 #19
0
ファイル: Glizycms.php プロジェクト: GruppoMeta/Movio
 function init()
 {
     if (__Config::get('QUERY_CACHING_INIT')) {
         org_glizy_dataAccessDoctrine_DataAccess::initCache();
     }
     glz_loadLocale('org.glizycms.*');
     glz_loadLocale('org.glizycms.contents.*');
     glz_loadLocale('org.glizycms.languages.*');
     $application = org_glizy_ObjectValues::get('org.glizy', 'application');
     if ($application) {
         if (!$application->isAdmin()) {
             org_glizy_ObjectFactory::remapClass('org.glizy.components.Page', 'org.glizycms.views.components.Page');
             org_glizy_ObjectFactory::remapClass('org.glizy.mvc.components.Page', 'org.glizycms.views.components.MvcPage');
             org_glizycms_userManager_fe_Module::registerModule();
         }
         // la creazione dell'istanza serve per il listener
         $speakingUrlManager = $application->registerProxy('org.glizycms.speakingUrl.Manager');
         // registra il resolver di default
         org_glizycms_speakingUrl_Manager::registerResolver(org_glizy_ObjectFactory::createObject('org.glizycms.speakingUrl.PageResolver'));
     }
     if (is_null(__Config::get('glizycms.sitemap.cacheLife'))) {
         __Config::set('glizycms.sitemap.cacheLife', 36000);
     }
     if (is_null(__Config::get('glizycms.content.history', ''))) {
         __Config::set('glizycms.content.history', true);
     }
     if (is_null(__Config::get('glizycms.content.history.comment', ''))) {
         __Config::set('glizycms.content.history.comment', false);
     }
     __Config::set('glizy.dataAccess.document.enableComment', __Config::get('glizycms.content.history.comment'));
     if (is_null(__Config::get('glizycms.pageEdit.editUrlEnabled', ''))) {
         __Config::set('glizycms.pageEdit.editUrlEnabled', true);
     }
     if (is_null(__Config::get('glizycms.mediaArchive.exifEnabled', ''))) {
         __Config::set('glizycms.mediaArchive.exifEnabled', false);
     }
     if (is_null(__Config::get('glizycms.speakingUrl', ''))) {
         __Config::set('glizycms.speakingUrl', false);
     }
     if (is_null(__Config::get('glizycms.content.showAllPageTypes', ''))) {
         __Config::set('glizycms.content.showAllPageTypes', true);
     }
     if (is_null(__Config::get('glizycms.form.actionLink.cssClass', ''))) {
         __Config::set('glizycms.form.actionLink.cssClass', 'btn action-link');
     }
     if (is_null(__Config::get('glizycms.print.enabled', ''))) {
         __Config::set('glizycms.print.enabled', false);
     }
     if (is_null(__Config::get('glizycms.print.pdf.enabled', ''))) {
         __Config::set('glizycms.print.pdf.enabled', false);
     }
     if (is_null(__Config::get('glizycms.mediaArchive.bridge', ''))) {
         __Config::set('glizycms.mediaArchive.bridge', 'org.glizycms.mediaArchive.Bridge');
     }
     self::$mediaArchiveBridge = org_glizy_ObjectFactory::createObject(__Config::get('glizycms.mediaArchive.bridge'));
     if ($application && __Config::get('glizycms.mediaArchive.mediaMappingEnabled')) {
         $application->registerProxy('org.glizycms.mediaArchive.services.MediaMappingService');
     }
 }
コード例 #20
0
ファイル: RecordDetailEx.php プロジェクト: GruppoMeta/Movio
 function render()
 {
     $content = $this->getContent();
     $outputTitle = '';
     $outputImage = '';
     $outputProperty = '';
     $outputDescription = '';
     foreach ($this->items as $i) {
         $value = $content[$i['field']];
         if (glz_empty($value)) {
             continue;
         }
         if (is_array($value) && $value['__html__']) {
             $value = $value['__html__'];
         }
         $renderCell = $i['renderCell'];
         if (!empty($renderCell)) {
             if (!is_object($renderCell)) {
                 $renderCell =& org_glizy_ObjectFactory::createObject($renderCell);
                 $i['renderCell'] = $renderCell;
             }
             if (is_object($renderCell)) {
                 $value = $renderCell->renderCell($value);
             }
         }
         $label = $i['label'];
         if (preg_match("/\\{i18n\\:.*\\}/i", $label)) {
             $code = preg_replace("/\\{i18n\\:(.*)\\}/i", "\$1", $label);
             $label = org_glizy_locale_Locale::getPlain($code);
         }
         if ($i['type'] == 'title') {
             $outputTitle .= '<h2>' . $value . '</h2>';
         } else {
             if ($i['type'] == 'property') {
                 $outputProperty .= '<li><span>' . $label . ':</span> ' . $value . '</li>';
             } else {
                 if ($i['type'] == 'description') {
                     $outputDescription .= '<h3>' . $label . '</h3> ' . $value;
                 } else {
                     if ($i['type'] == 'image') {
                         $outputImage .= $value;
                     }
                 }
             }
         }
     }
     $cssClass = $this->getAttribute('cssClass');
     if ($outputProperty != '') {
         $outputProperty = '<ul>' . $outputProperty . '</ul>';
     }
     if ($outputImage != '') {
         $outputImage = '<dic class="row"><div class="three columns images">' . $outputImage . '</div>';
         $outputProperty = '<div class="eight columns">' . $outputProperty . '</div></div>';
     }
     $output = '<div id="' . $this->getOriginalId() . '"' . ($cssClass != "" ? ' class="' . $cssClass . '"' : '') . '>';
     $output .= $outputTitle . $outputImage . $outputProperty . $outputDescription;
     $output .= '</div>';
     $this->addOutputCode($output);
 }
コード例 #21
0
 function process()
 {
     $groupId = __Request::get('groupId');
     if ($groupId) {
         $entityProxy = org_glizy_ObjectFactory::createObject('movio.modules.ontologybuilder.models.proxy.EntityProxy');
         $this->_content = $entityProxy->getContentsByProfile($groupId);
     }
 }
コード例 #22
0
ファイル: SelectDictionary.php プロジェクト: GruppoMeta/Movio
 function getItems()
 {
     $thesaurusProxy = org_glizy_ObjectFactory::createObject('movio.modules.thesaurus.models.proxy.ThesaurusProxy');
     $dictionaries = $thesaurusProxy->getAllDictionaries();
     foreach ($dictionaries as $dictionary) {
         $this->addItem($dictionary->getId(), $dictionary->title);
     }
 }
コード例 #23
0
ファイル: PluginManager.php プロジェクト: GruppoMeta/Movio
 static function processPluginChain($name, &$parent, $params)
 {
     $pluginsInfo = org_glizy_plugins_PluginManager::getPluginChain($name);
     foreach ($pluginsInfo as $plugin) {
         $pluginObj =& org_glizy_ObjectFactory::createObject($plugin);
         $pluginObj->run($parent, $params);
     }
 }
コード例 #24
0
ファイル: Query.php プロジェクト: GruppoMeta/Movio
 function __construct($model, $lifeTime = null, $cacheFolder = null)
 {
     $cacheFolder = $cacheFolder ? $cacheFolder : org_glizy_Paths::getRealPath('CACHE_CODE');
     $this->model = $model;
     $this->group = $cacheFolder . $model;
     $options = array('cacheDir' => $cacheFolder, 'lifeTime' => !$lifeTime ? org_glizy_Config::get('CACHE_CODE') : $lifeTime, 'readControlType' => '', 'fileExtension' => '.php');
     $this->_cacheObj =& org_glizy_ObjectFactory::createObject('org.glizy.cache.CacheFile', $options);
 }
コード例 #25
0
ファイル: Module.php プロジェクト: GruppoMeta/Movio
 static function registerModule()
 {
     if (__Config::get('DEBUG')) {
         include_once 'Helpers.php';
         self::$debugBar = org_glizy_ObjectFactory::createObject('org.glizy.debug.GlizyDebugBar');
         org_glizy_ObjectFactory::createObject('org.glizy.debug.Whoops');
     }
 }
コード例 #26
0
 public function execute($menuId)
 {
     $templateEnabled = __Config::get('glizycms.contents.templateEnabled');
     if ($templateEnabled) {
         $templateProxy = org_glizy_ObjectFactory::createObject('org.glizycms.template.models.proxy.TemplateProxy');
         $templateEnabled = $templateProxy->getTemplateAdmin() !== false;
     }
     $this->view->setAttribute('draw', $templateEnabled);
 }
コード例 #27
0
ファイル: Config.php プロジェクト: GruppoMeta/Movio
 function _compileXml($fileName)
 {
     $dirPath = dirname($fileName) . '/';
     $xml = org_glizy_ObjectFactory::createObject('org.glizy.parser.XML');
     $xml->load($fileName);
     foreach ($xml->documentElement->childNodes as $nc) {
         $this->_compileXmlNode($nc, $dirPath);
     }
 }
コード例 #28
0
ファイル: Logout.php プロジェクト: GruppoMeta/Movio
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function process()
 {
     $authClass = org_glizy_ObjectFactory::createObject(__Config::get('glizy.authentication'));
     if ($authClass) {
         $authClass->logout();
     }
     org_glizy_helpers_Navigation::gotoUrl(GLZ_HOST);
     exit;
 }
コード例 #29
0
ファイル: FieldTypeService.php プロジェクト: GruppoMeta/Movio
 private function loadXml()
 {
     $xml = org_glizy_ObjectFactory::createObject('org.glizy.parser.XML');
     $xml->loadAndParseNS($this->source);
     $fieldTypes = $xml->getElementsByTagName('fieldType');
     foreach ($fieldTypes as $fieldType) {
         $this->typeMap[$fieldType->getAttribute('id')] = $this->loadChildNodes($fieldType);
     }
 }
コード例 #30
0
 function process()
 {
     $this->_content = array();
     $termId = __Request::get('termId');
     if ($termId) {
         $thesaurusProxy = org_glizy_ObjectFactory::createObject('movio.modules.thesaurus.models.proxy.ThesaurusProxy');
         $term = $thesaurusProxy->loadTerm($termId);
         $this->_content = $thesaurusProxy->getDocumentsWithTerm($termId);
     }
 }