Example #1
0
 function createChildComponents()
 {
     $entityTypeService = $this->_application->retrieveProxy('movio.modules.ontologybuilder.service.EntityTypeService');
     $properties = $entityTypeService->getEntityTypeAttributeProperties(__Request::get('entityTypeId'), $this->_parent->getId());
     $moduleId = $properties['entity_properties_params'];
     $this->_content['title'] = $this->data->text;
     $c =& org_glizy_ObjectFactory::createComponent('org.glizy.components.Text', $this->_application, $this, 'glz:Text', 'title', 'title');
     $this->addChild($c);
     $this->_content['url'] = __Routing::makeUrl($moduleId, array('document_id' => $this->data->id, 'title' => $this->data->text));
     $c =& org_glizy_ObjectFactory::createComponent('org.glizy.components.Text', $this->_application, $this, 'glz:Text', 'url', 'url');
     $this->addChild($c);
     $module = org_glizy_Modules::getModule($moduleId);
     $ar = org_glizy_ObjectFactory::createModel($module->classPath . '.models.Model');
     $ar->load($this->data->id);
     if ($ar->fieldExists('image')) {
         $this->_content['__image'] = $ar->image;
         $c =& org_glizy_ObjectFactory::createComponent('org.glizy.components.Image', $this->_application, $this, 'glz:Image', '__image', '__image');
         $c->setAttribute('width', __Config::get('THUMB_WIDTH'));
         $c->setAttribute('height', __Config::get('THUMB_HEIGHT'));
         $c->setAttribute('crop', true);
         $this->addChild($c);
     } else {
         $c =& org_glizy_ObjectFactory::createComponent('movio.modules.ontologybuilder.views.components.NoImage', $this->_application, $this, 'glz:Image', '__image', '__image');
         $c->setAttribute('width', __Config::get('THUMB_SMALL_WIDTH'));
         $c->setAttribute('height', __Config::get('THUMB_SMALL_HEIGHT'));
         $this->addChild($c);
     }
 }
Example #2
0
 public function renderCell(&$ar)
 {
     $media = org_glizycms_mediaArchive_MediaManager::getMediaByRecord($ar);
     $sizes = method_exists($media, 'getOriginalSizes') ? $media->getOriginalSizes() : array('width' => 0, 'height' => 0);
     $thumbnail = $media->getThumbnail(__Config::get('THUMB_WIDTH'), __Config::get('THUMB_HEIGHT'), __Config::get('ADM_THUMBNAIL_CROP'), __Config::get('ADM_THUMBNAIL_CROPPOS'));
     $ar->thumb_filename = $thumbnail['fileName'];
     $ar->thumb_w = $thumbnail['width'];
     $ar->thumb_h = $thumbnail['height'];
     $ar->media_w = $sizes['width'];
     $ar->media_h = $sizes['height'];
     if ($ar->media_title == '') {
         $ar->media_title = $ar->media_originalFileName;
     }
     if (!$ar->media_date) {
         $ar->media_date = '';
     }
     if (!$ar->media_copyright) {
         $ar->media_copyright = '';
     }
     if (!$ar->media_description) {
         $ar->media_description = '';
     }
     $ar->__jsonMedia = org_glizycms_Glizycms::getMediaArchiveBridge()->getJsonFromAr($ar);
     $application = $this->application;
     $user = $application->_user;
     $ar->__url__ = $user->acl($application->getPageId(), 'edit') ? __Routing::makeUrl('actionsMVC', array('action' => 'edit', 'id' => $ar->media_id)) : false;
     $ar->__urlDelete__ = $user->acl($application->getPageId(), 'delete') ? __Routing::makeUrl('actionsMVC', array('action' => 'delete', 'id' => $ar->media_id)) : false;
     $ar->__urlDownload__ = org_glizycms_helpers_Media::getFileUrlById($ar->media_id);
     $ar->__urlPreview__ = org_glizycms_helpers_Media::getImageUrlById($ar->media_id, 800, 600);
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 public function collect()
 {
     $application = org_glizy_ObjectValues::get('org.glizy', 'application');
     $result = array();
     $result['pageId'] = $application->getPageId();
     $result['routing'] = __Request::get('__routingName__') . ' > ' . __Request::get('__routingPattern__');
     $result['controllers'] = implode(', ', $this->calledControllers);
     $user = $application->getCurrentUser();
     $userData = array('id' => $user->id, 'firstName' => $user->firstName, 'lastName' => $user->lastName, 'email' => $user->email, 'groupId' => $user->groupId, 'backEndAccess' => $user->backEndAccess);
     $result['user'] = $this->getDataFormatter()->formatVar($userData);
     $menu = $application->getCurrentMenu();
     $menuData = array('id' => $menu->id, 'title' => $menu->title, 'parentId' => $menu->parentId, 'pageType' => $menu->pageType, 'type' => $menu->type, 'depth' => $menu->depth);
     $result['menu'] = $this->getDataFormatter()->formatVar($menuData);
     // request
     $data = __Request::getAllAsArray();
     $tempData = array();
     foreach ($data as $k => $v) {
         if (strpos($k, '__') !== 0) {
             $tempData[$k] = $v;
         }
     }
     $result['__Request'] = $this->getDataFormatter()->formatVar($tempData);
     $result['__Config'] = $this->getDataFormatter()->formatVar(__Config::getAllAsArray());
     $result['__Routing'] = $this->getDataFormatter()->formatVar(__Routing::getAllAsArray());
     $result['__Session'] = $this->getDataFormatter()->formatVar(__Session::getAllAsArray());
     return $result;
 }
Example #4
0
 public function process()
 {
     $this->_content = new org_glizycms_contents_views_components_SiteTreeViewVO();
     $this->_content->addLabel = $this->getAttribute('addLabel');
     $this->_content->title = $this->getAttribute('title');
     $this->_content->ajaxUrl = $this->getAjaxUrl();
     $this->_content->addUrl = __Routing::makeUrl('linkChangeAction', array('action' => 'add'));
 }
Example #5
0
 public function process()
 {
     if ($this->getAttribute('mode') == 'container') {
         $this->emptySrc = __Routing::makeUrl('linkChangeAction', array('action' => $this->getAttribute('initialState')));
         $this->editSrc = __Routing::makeUrl('linkChangeAction', array('action' => $this->getAttribute('editState'))) . '?dictionaryId=' . __Request::get('dictionaryId') . '&termId=';
     } else {
         $termId = __Request::get('termId');
         $thesaurusProxy = org_glizy_ObjectFactory::createObject('movio.modules.thesaurus.models.proxy.ThesaurusProxy');
         $termVo = $thesaurusProxy->loadTerm($termId);
         $this->setData($termVo);
         parent::process();
     }
 }
Example #6
0
 function fixLanguages($templateSource)
 {
     $templateSource = str_replace('<head>', '<head><base href="' . GLZ_HOST . '/" />', $templateSource);
     $templateSource = preg_replace('/(\\<html.*xml:lang=)"([^"]*)"/', '$1"' . $this->language . '"', $templateSource);
     $templateSource = preg_replace('/(\\<html.*lang=)"([^"]*)"/', '$1"' . $this->language . '"', $templateSource);
     if (org_glizy_Config::get('SEF_URL') === 'full') {
         // non è il massimo ma la regexp su testi lunghi crasha
         $templateSource = str_replace(array('href="#', 'href=\'#', 'href="noTranslate:'), array('href="' . __Routing::scriptUrl() . '#', 'href=\'' . __Routing::scriptUrl() . '#', 'href="'), $templateSource);
         //$newtemplateSource = preg_replace("/<(.*?)(href)\s*=\s*(\'|\")(\#.*)(\'|\")(.*?)>/si", "<$1$2=$3".__Routing::scriptUrl()."$4$5$6>", $templateSource);
         // if ( !empty( $newtemplateSource ) )
         // 			{
         // 				$templateSource = &$newtemplateSource;
         // 			}
     }
     return $templateSource;
 }
Example #7
0
 public function process()
 {
     if ($this->getAttribute('mode') == 'container') {
         $this->emptySrc = __Routing::makeUrl('linkChangeAction', array('action' => $this->getAttribute('initialState')));
         $this->editSrc = __Routing::makeUrl('linkChangeAction', array('action' => $this->getAttribute('editState'))) . '?menuId=';
     } else {
         $this->menuId = __Request::get('menuId');
         // TODO: lanciare un'eccezione se l'id non è valido
         $menuProxy = org_glizy_ObjectFactory::createObject('org.glizycms.contents.models.proxy.MenuProxy');
         $menu = $menuProxy->getMenuFromId($this->menuId, org_glizy_ObjectValues::get('org.glizy', 'editingLanguageId'));
         // TODO: il menù viene letto due volte, in questo codice ed in readContentFromMenu
         $contentProxy = org_glizy_ObjectFactory::createObject('org.glizycms.contents.models.proxy.ContentProxy');
         $content = $contentProxy->readContentFromMenu($this->menuId, org_glizy_ObjectValues::get('org.glizy', 'editingLanguageId'));
         $this->setData($content);
         $this->addComponentsToEdit($menu);
         parent::process();
     }
 }
Example #8
0
 function _makeNavigationMenu(&$node, $endDepth, &$menu, $skip = false)
 {
     $skip = !$skip ? $node->depth < $this->_startDepth : $skip;
     if ($node->type == 'BLOCK') {
         return true;
     }
     if ($node->depth > $endDepth) {
         return true;
     }
     if ($node->isVisible == 0) {
         return true;
     }
     if (is_string($node->isVisible) && preg_match("/\\{php\\:.*\\}/i", $node->isVisible)) {
         $phpcode = org_glizy_helpers_PhpScript::parse($node->isVisible);
         if (!eval($phpcode)) {
             return true;
         }
     }
     if ($node->type == 'SYSTEM' && !$skip) {
         return true;
     }
     if (!$this->_application->canViewPage($node->id)) {
         return true;
     }
     $nodeTitle = empty($node->titleLink) ? $node->title : $node->titleLink;
     $nodeDescription = empty($node->linkDescription) ? $nodeTitle : $node->linkDescription;
     $menuNode = array();
     if (!$skip) {
         $menuNode['id'] = $node->id;
         $menuNode['title'] = $nodeTitle;
         $menuNode['label'] = $nodeDescription;
         $menuNode['depth'] = $node->depth;
         $menuNode['type'] = $node->pageType;
         $menuNode['cssClass'] = $node->cssClass;
         $menuNode['haveChild'] = $node->hasChildNodes();
         if ($this->_currentMenuId == $node->id && !$this->getAttribute('forceLink')) {
             $menuNode['node'] = $nodeTitle;
         } else {
             $cssClass = $this->getAttribute('selectLink') && $this->_currentMenuId == $node->id ? $this->getAttribute('cssCurrent') : '';
             if (empty($node->url)) {
                 $linkParams = array('pageId' => $node->id, 'title' => $nodeDescription, 'label' => $nodeTitle, 'cssClass' => $cssClass, 'icon' => $node->icon);
                 $menuNode['node'] = org_glizy_helpers_Link::makeLink('link', $linkParams);
             } else {
                 $url = $node->url;
                 if (strpos($url, 'route:') !== false) {
                     $url = substr($url, 6);
                     $url = __Routing::makeUrl($url, __Request::getAllAsArray());
                 }
                 $menuNode['node'] = org_glizy_helpers_Link::makeSimpleLink($nodeTitle, $url, $nodeDescription, $cssClass);
             }
         }
         if (!$this->getAttribute('selectLink')) {
             if (!$this->getAttribute('selectParent')) {
                 $menuNode['selected'] = $this->_currentMenuId == $node->id ? ' ' . $this->getAttribute('attributeToSelect') . '="' . $this->getAttribute('cssCurrent') . '"' : '';
             } else {
                 $parentNode =& $this->_currentMenu->parentNodeByDepth($node->depth);
                 if (is_object($parentNode) && $node->depth > 1) {
                     $menuNode['selected'] = $parentNode->id == $node->id || $this->_currentMenuId == $node->id ? ' ' . $this->getAttribute('attributeToSelect') . '="' . $this->getAttribute('cssCurrent') . '"' : '';
                 }
             }
         }
     }
     if (count($menuNode)) {
         $menu[] = $menuNode;
     }
     if ($node->hasChildNodes()) {
         $childNodes =& $node->childNodes();
         $tempMenu = array();
         for ($i = 0; $i < count($childNodes); $i++) {
             $newEndDepth = max($this->_endDepth + (in_array($node->id, $this->_menuToOpen) ? 1 : 0), $node->depth + (in_array($node->id, $this->_menuToOpen) ? 1 : 0));
             if ($this->getAttribute('showOnlyChilds')) {
                 if (in_array($node->id, $this->_menuToOpen) || $this->_startMenu->depth == $node->depth || $this->_currentMenuId == $node->id || $this->getAttribute('drawAllChilds')) {
                     $this->_makeNavigationMenu($childNodes[$i], $newEndDepth, $tempMenu);
                 }
             } else {
                 $this->_makeNavigationMenu($childNodes[$i], $newEndDepth, $tempMenu);
             }
         }
         if (count($tempMenu)) {
             $menuNode['node'] = $tempMenu;
             $menuNode['selected'] = '';
             if ($this->getAttribute('flat') && count($menu)) {
                 $menu = array_merge($menu, $menuNode['node']);
             } else {
                 $menu[] = $menuNode;
             }
         }
     }
     if ($skip && count($menu)) {
         $menu = $menu[0]['node'];
     }
 }
Example #9
0
 public function getDocumentsWithTerm($termId)
 {
     $application = org_glizy_ObjectValues::get('org.glizy', 'application');
     $entityTypeService = $application->retrieveProxy('movio.modules.ontologybuilder.service.EntityTypeService');
     $entityResolver = org_glizy_objectFactory::createObject('movio.modules.ontologybuilder.EntityResolver');
     $menuMap = array();
     // TODO: non va bene l'implementazione perché scorre tutti i documenti
     // eseguire un filtro sui documenti del tipo di entità che ha una campo di tipo dizionario
     $it = org_glizy_ObjectFactory::createModelIterator('movio.modules.ontologybuilder.models.EntityDocument')->load('All');
     $result = array();
     foreach ($it as $ar) {
         $entityTypeId = $entityTypeService->getEntityTypeId($ar->getType());
         if (!isset($menuMap[$entityTypeId])) {
             $arMenu = $entityResolver->getMenuVisibleEntity($entityTypeId);
             $menuMap[$entityTypeId] = $arMenu;
         } else {
             $arMenu = $menuMap[$entityTypeId];
         }
         $thesaurusAttribute = $entityTypeService->getAttributeByType($entityTypeId, 'attribute.thesaurus');
         $descriptionAttribute = $entityTypeService->getDescriptionAttribute($entityTypeId);
         // se l'entità di questo documento ha un campo di tipo thesaurus
         if ($arMenu && $thesaurusAttribute) {
             $thesaurusAttribute = $this->prepareThesaurusAttribute($thesaurusAttribute);
             foreach ($thesaurusAttribute as $attribute) {
                 if ($ar->keyInDataExists($attribute)) {
                     if (!is_array($ar->{$attribute})) {
                         continue;
                     }
                     // si cerca nei tag il termine con id uguale a termId
                     foreach ($ar->{$attribute} as $term) {
                         if ($term->id == $termId) {
                             $document_id = $ar->getId();
                             $result[] = array('id' => $document_id, 'title' => $ar->title, 'description' => glz_strtrim($descriptionAttribute && $ar->keyInDataExists($descriptionAttribute) ? $ar->{$descriptionAttribute} : '', 300), 'url' => __Routing::makeUrl('showEntityDetail', array('pageId' => $arMenu->id, 'entityTypeId' => $entityTypeId, 'document_id' => $document_id)));
                             break;
                         }
                     }
                 }
             }
         }
     }
     return $result;
 }
Example #10
0
    /**
     * Render
     *
     * @return	void
     * @access	public
     */
    function render()
    {
        // TODO tradurre le label
        $output = '';
        $output .= '<table id="' . $this->getId() . '" class="js-modulesManager ' . $this->getAttribute('cssClass') . '">';
        if ($this->getAttribute('label') != '') {
            $output .= '<caption>' . $this->getAttribute('label') . '</caption>';
        }
        // disegna le colonne
        $output .= '<thead>';
        $output .= '<tr>';
        $output .= '<th class="name">Plugin</th>';
        $output .= '<th>Descrizione</th>';
        $output .= '<th class="actions"></th>';
        $output .= '</tr>';
        $output .= '<tfoot><tr><td colspan="3"></td></tr></tfoot>';
        $output .= '<tbody>';
        $origCssClass = explode(',', $this->getAttribute('cssClass'));
        $tempCssClass = array();
        $modulesState = org_glizy_Modules::getModulesState();
        $modules = org_glizy_Modules::getModules();
        $this->sort($modules);
        foreach ($modules as $m) {
            // $moduleDescription = org_glizy_ObjectFactory::createObject( 'org.glizy.ModuleDescription', $m );
            // if ( !empty( $m->pageType ) ) continue;
            $isEnabled = !isset($modulesState[$m->id]) || $modulesState[$m->id];
            if (!count($tempCssClass)) {
                $tempCssClass = $origCssClass;
            }
            $cssClass = array_shift($tempCssClass);
            $cssClass .= ' ' . ($isEnabled ? 'enabled' : 'disabled');
            $output .= '<tr class="' . $cssClass . '">' . '<td class="name">' . __T($m->name) . '</td>' . '<td>' . '<p class="description">' . $m->description . '</p>' . '<p class="info">Versione ' . $m->version . ' | ' . __Link::makeLink2(null, array('label' => $m->author, 'title' => 'Visita il sito dell\'autore', 'url' => $m->authorUrl, 'rel' => 'external')) . ' | ' . __Link::makeLink2(null, array('label' => 'Visita il sito del plugin', 'url' => $m->pluginUrl, 'rel' => 'external')) . '</p>' . '</td>' . '<td class="actions">' . (!$isEnabled ? '<a href="" data-action="enable" data-id="' . $m->id . '" class="js-modulesManagerAction action">abilita</a>' : '') . ($isEnabled ? '<a href="" data-action="disable" data-id="' . $m->id . '" class="js-modulesManagerAction action">disabilita</a>' : '') . ' ' . ($m->canDuplicated ? '<a href="' . __Routing::makeUrl('glizycmsModuleManagerDuplicate', array('pageId' => $this->pageId, 'id' => $m->id)) . '" class="action">duplica</a>' : '') . '</td>' . '</tr>';
        }
        $output .= '</tbody>';
        $output .= '</table>';
        $output .= <<<EOD
<script type="text/javascript">
jQuery(document).ready(function() {

\t\$("table.js-modulesManager a.js-modulesManagerAction ").click( function( e ){
\t\te.stopPropagation();
\t\tif ( jQuery( this ).data( "action" ) == "uninstall" )
\t\t{
\t\t\tif ( !confirm( "Sei sicuro di voler rimuovere il plugin?") )
\t\t\t{
\t\t\t\treturn false;
\t\t\t}
\t\t}

\t\t// jQuery.modal('<div></div>', {
\t\t// \tclose: false,
\t\t// \toverlayCss:{
\t\t// \t\tbackgroundColor:"#000"
\t\t// \t},
\t\t// \toverlayClose: false
\t\t// });

\t\tjQuery.ajax( { url: Glizy.ajaxUrl+jQuery( this ).data( "action" ),
\t\t\t\t\ttype: 'POST',
\t\t\t\t\tdata: { id: jQuery( this ).data( "id" ) },
\t\t\t\t\tsuccess: function( response, r, a ) {
\t\t\t\t\t\tlocation.reload();
\t\t\t\t\t}});
\t\treturn false;
\t});

});
</script>
EOD;
        $this->addOutputCode($output);
    }
Example #11
0
 function process()
 {
     $content = org_glizy_helpers_Convert::formEditObjectToStdObject($this->_parent->loadContent($this->getId(), true));
     $this->_content = new movio_modules_storyteller_views_skins_StorytellerSkinIterator($content, $this->_application->getPageId(), __Routing::scriptUrl());
 }
Example #12
0
 function createChildComponents()
 {
     $entityTypeId = $this->_content['entityTypeId'];
     $c =& org_glizy_ObjectFactory::createComponent('org.glizy.components.Text', $this->_application, $this, 'glz:Text', 'title', 'title');
     $this->addChild($c);
     $this->_content['url'] = __Routing::makeUrl('showEntityDetail', array('entityTypeId' => $entityTypeId, 'document_id' => $this->_content['document_id']));
     $c =& org_glizy_ObjectFactory::createComponent('org.glizy.components.Text', $this->_application, $this, 'glz:Text', 'url', 'url');
     $this->addChild($c);
     $entityTypeService = $this->_application->retrieveProxy('movio.modules.ontologybuilder.service.EntityTypeService');
     $it = org_glizy_objectFactory::createModelIterator('movio.modules.ontologybuilder.models.EntityProperties');
     $it->load('entityPropertiesFromId', array('entityId' => $entityTypeId));
     foreach ($it as $ar) {
         $attribute = $entityTypeService->getAttributeIdByAr($ar);
         switch ($ar->entity_properties_type) {
             case 'attribute.image':
                 if (is_null($this->_content['__image']) && $this->_content[$attribute]) {
                     $c =& org_glizy_ObjectFactory::createComponent('org.glizy.components.Image', $this->_application, $this, 'glz:Image', '__image', '__image');
                     $c->setAttribute('width', __Config::get('THUMB_WIDTH'));
                     $c->setAttribute('height', __Config::get('THUMB_HEIGHT'));
                     $c->setAttribute('crop', true);
                     $this->addChild($c);
                     $this->_content['__image'] = $this->_content[$attribute];
                 }
                 break;
         }
         if (is_null($this->_content['__description']) && $ar->entity_properties_dublic_core == 'DC.Description' && $this->_content[$attribute]) {
             $c =& org_glizy_ObjectFactory::createComponent('org.glizy.components.LongText', $this->_application, $this, 'glz:LongText', '__description', '__description');
             $c->setAttribute('adm:htmlEditor', true);
             $this->addChild($c);
             $this->_content['__description'] = glz_strtrim(strip_tags($this->_content[$attribute]));
         }
     }
     // controlla se esiste una lista media/immagini e ne prende la prima
     if (is_null($this->_content['__image'])) {
         foreach ($it as $ar) {
             $attribute = $entityTypeService->getAttributeIdByAr($ar);
             switch ($ar->entity_properties_type) {
                 case 'attribute.imagelist':
                     if (is_null($this->_content['__image']) && $this->_content[$attribute]) {
                         $objectVars = get_object_vars($this->_content[$attribute]);
                         $content = array_shift($objectVars);
                         $c =& org_glizy_ObjectFactory::createComponent('org.glizy.components.Image', $this->_application, $this, 'glz:Image', '__image', '__image');
                         $c->setAttribute('width', __Config::get('THUMB_SMALL_WIDTH'));
                         $c->setAttribute('height', __Config::get('THUMB_SMALL_HEIGHT'));
                         $c->setAttribute('crop', true);
                         $this->addChild($c);
                         $this->_content['__image'] = $content[0];
                     }
                     break;
             }
         }
     }
     // inserisce un'immagine di default
     if (is_null($this->_content['__image'])) {
         $c =& org_glizy_ObjectFactory::createComponent('movio.modules.ontologybuilder.views.components.NoImage', $this->_application, $this, 'glz:Image', '__image', '__image');
         $c->setAttribute('width', __Config::get('THUMB_SMALL_WIDTH'));
         $c->setAttribute('height', __Config::get('THUMB_SMALL_HEIGHT'));
         $this->addChild($c);
     }
     if (is_null($this->_content['__description'])) {
         foreach ($it as $ar) {
             $attribute = $entityTypeService->getAttributeIdByAr($ar);
             if (is_null($ar->entity_properties_target_FK_entity_id) && preg_match('/text$/', $ar->entity_properties_type) && $this->_content[$attribute]) {
                 $c =& org_glizy_ObjectFactory::createComponent('org.glizy.components.LongText', $this->_application, $this, 'glz:LongText', '__description', '__description');
                 $c->setAttribute('adm:htmlEditor', true);
                 $this->addChild($c);
                 $this->_content['__description'] = glz_strtrim(strip_tags($this->_content[$attribute]));
             }
         }
     }
 }
Example #13
0
 public function getContentsByProfile($groupId)
 {
     $application = org_glizy_ObjectValues::get('org.glizy', 'application');
     $entityTypeService = $application->retrieveProxy('movio.modules.ontologybuilder.service.EntityTypeService');
     $entityResolver = org_glizy_objectFactory::createObject('movio.modules.ontologybuilder.EntityResolver');
     $arGroup = org_glizy_objectFactory::createModel('org.glizycms.groupManager.models.UserGroup');
     $arGroup->load($groupId);
     $it = org_glizy_objectFactory::createModelIterator('movio.modules.ontologybuilder.models.EntityDocument')->load('All')->where('profile', $arGroup->usergroup_name)->orderBy('title');
     foreach ($it as $ar) {
         $entityTypeId = $entityTypeService->getEntityTypeId($ar->getType());
         $descriptionAttribute = $entityTypeService->getDescriptionAttribute($entityTypeId);
         $arMenu = $entityResolver->getMenuVisibleEntity($entityTypeId);
         if ($arMenu) {
             $result[] = array('title' => $ar->title, 'description' => $descriptionAttribute && $ar->keyInDataExists($descriptionAttribute) ? $ar->{$descriptionAttribute} : '', 'url' => __Routing::makeUrl('showEntityDetail', array('pageId' => $arMenu->id, 'entityTypeId' => $entityTypeId, 'document_id' => $ar->getId())));
         }
     }
     return $result;
 }
Example #14
0
 function goHere($params = null, $hash)
 {
     org_glizy_helpers_Navigation::gotoUrl(__Routing::scriptUrl(), $params, $hash);
 }