Example #1
0
 public function getMenuItems()
 {
     $aItems = parent::getMenuItems();
     foreach ($aItems as $iKey => $aItem) {
         switch ($aItem['name']) {
             case 'switch_language':
                 $aItems[$iKey]['title'] = _t('_sys_menu_item_title_switch_language_mask', $aItems[$iKey]['title'], genFlag());
                 break;
             case 'switch_template':
                 $aTemplates = get_templates_array(true, true);
                 $sTemplate = $aTemplates[$this->_oTemplate->getCode()];
                 $aItems[$iKey]['title'] = _t('_sys_menu_item_title_switch_template_mask', $aItems[$iKey]['title'], $sTemplate);
                 break;
         }
     }
     return $aItems;
 }
Example #2
0
 public function getMenuItems()
 {
     $aItems = parent::getMenuItems();
     foreach ($aItems as $iKey => $aItem) {
         switch ($aItem['name']) {
             case 'switch_language':
                 $sLanguage = BxDolLanguages::getInstance()->getCurrentLangName();
                 $sIcon = $this->_oTemplate->parseHtmlByName('bx_img.html', array('src' => $this->_oTemplate->getIconUrl('sys_fl_' . $sLanguage . '.gif'), 'bx_repeat:attrs' => array()));
                 $aItems[$iKey]['title'] = _t('_sys_menu_item_title_switch_language_mask', $aItems[$iKey]['title'], $sIcon);
                 break;
             case 'switch_template':
                 $aTemplates = get_templates_array(true, true);
                 $sTemplate = $aTemplates[$this->_oTemplate->getCode()];
                 $aItems[$iKey]['title'] = _t('_sys_menu_item_title_switch_template_mask', $aItems[$iKey]['title'], $sTemplate);
                 break;
         }
     }
     return $aItems;
 }
Example #3
0
 public function getMenuItems()
 {
     $a = parent::getMenuItems();
     if (!isLogged()) {
         return $a;
     }
     foreach ($a as $k => $r) {
         if ('account' != $r['name']) {
             continue;
         }
         $oProfile = BxDolProfile::getInstance(bx_get_logged_profile_id());
         $sUrlIcon = $oProfile->getThumb();
         if (!$sUrlIcon) {
             break;
         }
         $a[$k]['bx_if:image'] = array('condition' => true, 'content' => array('icon_url' => $sUrlIcon));
         $a[$k]['bx_if:icon']['condition'] = false;
     }
     return $a;
 }
 public function getMenuItems()
 {
     $this->loadData();
     return parent::getMenuItems();
 }