• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP BxDolMenu类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中BxDolMenu的典型用法代码示例。如果您正苦于以下问题:PHP BxDolMenu类的具体用法?PHP BxDolMenu怎么用?PHP BxDolMenu使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了BxDolMenu类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($aObject, $oTemplate = false)
 {
     parent::__construct($aObject, $oTemplate);
     $this->sModule = 'bx_notifications';
     bx_import('BxDolMenu');
     BxDolMenu::getObjectInstance('sys_account_dashboard_submenu')->setSelected($this->sModule, 'account-dashboard-notifications');
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:7,代码来源:BxNtfsPageView.php


示例2: getCode

 public function getCode()
 {
     // check if content exists
     if (!$this->_aContentInfo) {
         // if entry is not found - display standard "404 page not found" page
         $this->_oTemplate->displayPageNotFound();
         exit;
     }
     // permissions check
     if (CHECK_ACTION_RESULT_ALLOWED !== ($sMsg = $this->_oModule->checkAllowedView($this->_aContentInfo))) {
         $this->_oTemplate->displayAccessDenied($sMsg);
         exit;
     }
     $this->_oModule->checkAllowedView($this->_aContentInfo, true);
     // count views
     $CNF =& $this->_oModule->_oConfig->CNF;
     if (!empty($CNF['OBJECT_VIEWS'])) {
         BxDolView::getObjectInstance($CNF['OBJECT_VIEWS'], $this->_aContentInfo[$CNF['FIELD_ID']])->doView();
     }
     // add content metatags
     if (!empty($CNF['OBJECT_METATAGS'])) {
         $o = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS']);
         if ($o) {
             $o->metaAdd($this->_aContentInfo[$CNF['FIELD_ID']], $this->_getThumbForMetaObject());
         }
     }
     $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
     // add actions menu to submenu
     if (isset($CNF['OBJECT_MENU_ACTIONS_VIEW_ENTRY_POPUP'])) {
         $oMenuSubmenu->setObjectActionsMenu($CNF['OBJECT_MENU_ACTIONS_VIEW_ENTRY_POPUP']);
     }
     // add social sharing menu to submenu
     $oMenuSubmenu->setServiceSocialSharing(array('module' => $this->MODULE, 'method' => 'entity_social_sharing'));
     return parent::getCode();
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:35,代码来源:BxBaseModGeneralPageEntry.php


示例3: getCode

 /**
  * Get menu code.
  * @return string
  */
 public function getCode()
 {
     $aMenuItemSelected = $this->_getSelectedMenuItem();
     if (isset($aMenuItemSelected['set_name']) && 'sys_site' == $aMenuItemSelected['set_name'] && 'home' == $aMenuItemSelected['name']) {
         return '';
     }
     $this->_addJsCss();
     $oMenuSubmenu = BxDolMenu::getObjectInstance($this->_sObjectSubmenu);
     $aVars = array('object' => $this->_sObject, 'id' => 'bx-menu-submenu-menu', 'title' => $aMenuItemSelected['title'], 'link' => BxDolPermalinks::getInstance()->permalink($aMenuItemSelected['link']), 'popup' => $oMenuSubmenu ? BxTemplFunctions::getInstance()->transBox('bx-menu-submenu-menu', '<div class="bx-def-padding">' . $oMenuSubmenu->getCode() . '</div>', true) : '', 'bx_if:menu' => array('condition' => $oMenuSubmenu, 'content' => array()), 'bx_if:image' => array('condition' => false !== strpos($aMenuItemSelected['icon'], '.'), 'content' => array('icon_url' => $aMenuItemSelected['icon'])), 'bx_if:icon' => array('condition' => false === strpos($aMenuItemSelected['icon'], '.'), 'content' => array('icon' => $aMenuItemSelected['icon'])), 'bx_repeat:menus' => array());
     $aMenus = $this->getSubmenuParams($aMenuItemSelected);
     foreach ($aMenus as $aMenu) {
         $sPopupContent = '';
         if (isset($aMenu['object']) && ($oMenu = BxDolMenu::getObjectInstance($aMenu['object']))) {
             $sPopupContent = $oMenu->getCode();
         } elseif (isset($aMenu['service']) && is_array($aMenu['service'])) {
             $sPopupContent = BxDolService::call($aMenu['service']['module'], $aMenu['service']['method'], isset($aMenu['service']['params']) ? $aMenu['service']['params'] : array(), isset($aMenu['service']['class']) ? $aMenu['service']['class'] : 'Module');
         }
         if (!$sPopupContent) {
             continue;
         }
         $aVars['bx_repeat:menus'][] = array('id' => $aMenu['id'], 'icon' => $aMenu['icon'], 'popup' => BxTemplFunctions::getInstance()->transBox($aMenu['id'], '<div class="bx-def-padding">' . $sPopupContent . '</div>', true));
     }
     if (!$aVars['bx_repeat:menus'] && (!$oMenuSubmenu || !$aMenuItemSelected)) {
         return '';
     }
     $sMenu = $this->_oTemplate->parseHtmlByName($this->_aObject['template'], $aVars);
     return $this->_oTemplate->parseHtmlByName('menu_main_submenu_wrapper.html', array('menu' => $sMenu));
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:32,代码来源:BxBaseMenuSubmenu.php


示例4: serviceManageTools

 public function serviceManageTools($sType = 'common')
 {
     $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getGridObject($sType));
     if (!$oGrid) {
         return '';
     }
     $CNF =& $this->_oConfig->CNF;
     $sMenu = '';
     if (BxDolAcl::getInstance()->isMemberLevelInSet(192)) {
         $oPermalink = BxDolPermalinks::getInstance();
         $aMenuItems = array();
         if (!empty($CNF['OBJECT_GRID_COMMON']) && !empty($CNF['T']['menu_item_manage_my'])) {
             $aMenuItems[] = array('id' => 'manage-common', 'name' => 'manage-common', 'class' => '', 'link' => $oPermalink->permalink($CNF['URL_MANAGE_COMMON']), 'target' => '_self', 'title' => _t($CNF['T']['menu_item_manage_my']), 'active' => 1);
         }
         if (!empty($CNF['OBJECT_GRID_ADMINISTRATION']) && !empty($CNF['T']['menu_item_manage_all'])) {
             $aMenuItems[] = array('id' => 'manage-administration', 'name' => 'manage-administration', 'class' => '', 'link' => $oPermalink->permalink($CNF['URL_MANAGE_ADMINISTRATION']), 'target' => '_self', 'title' => _t($CNF['T']['menu_item_manage_all']), 'active' => 1);
         }
         if (count($aMenuItems) > 1) {
             $oMenu = new BxTemplMenu(array('template' => 'menu_vertical.html', 'menu_items' => $aMenuItems), $this->_oTemplate);
             $oMenu->setSelected($this->_aModule['name'], 'manage-' . $sType);
             $sMenu = $oMenu->getCode();
         }
     }
     if (!empty($CNF['OBJECT_MENU_SUBMENU'])) {
         BxDolMenu::getObjectInstance($CNF['OBJECT_MENU_SUBMENU'])->setSelected($this->_aModule['name'], $CNF['URI_MANAGE_COMMON']);
     }
     $this->_oTemplate->addCss(array('manage_tools.css'));
     $this->_oTemplate->addJs(array('manage_tools.js'));
     $this->_oTemplate->addJsTranslation(array('_sys_grid_search'));
     return array('content' => $this->_oTemplate->getJsCode('manage_tools', array('sObjNameGrid' => $this->_oConfig->getGridObject($sType))) . $oGrid->getCode(), 'menu' => $sMenu);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:31,代码来源:BxBaseModGeneralModule.php


示例5: __construct

 public function __construct($aObject, $oTemplate = false)
 {
     parent::__construct($aObject, $oTemplate);
     // get profile info
     $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
     if ($iProfileId) {
         $this->_oProfile = BxDolProfile::getInstance($iProfileId);
         $this->_aProfileInfo = $this->_oProfile ? $this->_oProfile->getInfo() : false;
     }
     if (!$this->_aProfileInfo || !$this->_oProfile) {
         return;
     }
     // select view profile submenu
     $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
     if ($oMenuSubmenu) {
         $oMenuSubmenu->setObjectSubmenu('bx_persons_view_submenu', array('title' => $this->_oProfile->getDisplayName(), 'link' => $this->_oProfile->getUrl(), 'icon' => $this->_oProfile->getIcon()));
     }
     // add replaceable markers
     $this->addMarkers($this->_aProfileInfo);
     // every profile field can be used as marker
     $this->addMarkers(array('profile_id' => $this->_oProfile->id()));
     // profile id field is also suported
     $this->addMarkers(array('display_name' => $this->_oProfile->getDisplayName()));
     // profile display name is also suported
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:25,代码来源:BxBaseModTextPageAuthor.php


示例6: performActionSetAclLevel

 public function performActionSetAclLevel()
 {
     $oMenu = BxDolMenu::getObjectInstance('sys_set_acl_level');
     $aIds = bx_get('ids');
     if (!$aIds || !is_array($aIds) || !$oMenu) {
         $this->_echoResultJson(array());
         return;
     }
     $aIdsResult = array();
     foreach ($aIds as $iId) {
         $aContentInfo = $this->_oModule->_oDb->getContentInfoById($iId);
         if ($this->_oModule->checkAllowedSetMembership($aContentInfo) !== CHECK_ACTION_RESULT_ALLOWED) {
             continue;
         }
         $aIdsResult[] = $this->_getProfileId($iId);
     }
     if (empty($aIdsResult)) {
         $this->_echoResultJson(array());
         return;
     }
     if (count($aIdsResult) == 1) {
         $aIdsResult = $aIdsResult[0];
     }
     $sContent = $this->_oTemplate->parseHtmlByName('set_acl_popup.html', array('content' => $oMenu->getCode($aIdsResult)));
     $sContent = BxTemplFunctions::getInstance()->transBox($this->_oModule->_oConfig->getName() . 'set_acl_level_popup', $sContent);
     $this->_echoResultJson(array('popup' => $sContent), true);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:27,代码来源:BxBaseModProfileGridAdministration.php


示例7: __construct

 public function __construct($aObject, $oTemplate = false)
 {
     parent::__construct($aObject, $oTemplate);
     $this->_oModule = BxDolModule::getInstance($this->MODULE);
     // select module submenu
     $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
     $oMenuSubmenu->setObjectSubmenu($this->_oModule->_oConfig->CNF['OBJECT_MENU_SUBMENU']);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:8,代码来源:BxBaseModGeneralPageBrowse.php


示例8: _getTemplateVars

 protected function _getTemplateVars()
 {
     $aVars = parent::_getTemplateVars();
     $aVars['bx_repeat:menu_items'] = array(true);
     $aVars['profile_display_name'] = BxDolProfile::getInstance()->getDisplayName();
     $aVars['url_switch_profile'] = BxDolPermalinks::getInstance()->permalink('page.php?i=account-profile-switcher');
     $aVars['menu_account'] = BxDolMenu::getObjectInstance('sys_account')->getCode();
     $aVars['menu_notifications'] = BxDolMenu::getObjectInstance('sys_account_notifications')->getCode();
     return $aVars;
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:10,代码来源:BxBaseMenuAccountPopup.php


示例9: __construct

 public function __construct($aObject, $oTemplate = false)
 {
     parent::__construct($aObject, $oTemplate);
     $CNF =& $this->_oModule->_oConfig->CNF;
     $aInformers = array();
     // get profile info
     $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
     $iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
     if ($iProfileId) {
         $this->_oProfile = BxDolProfile::getInstance($iProfileId);
     }
     if (!$this->_oProfile && $iContentId) {
         $this->_oProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $this->MODULE);
     }
     if ($this->_oProfile) {
         $this->_aProfileInfo = $this->_oProfile->getInfo();
         $this->_aContentInfo = $this->_oModule->_oDb->getContentInfoById($this->_aProfileInfo['content_id']);
     }
     if (!$this->_aContentInfo || !$this->_oProfile) {
         return;
     }
     // select view profile submenu
     $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
     $oMenuSubmenu->setObjectSubmenu($CNF['OBJECT_MENU_SUBMENU_VIEW_ENTRY'], array('title' => $this->_oProfile->getDisplayName(), 'link' => $this->_oProfile->getUrl(), 'icon' => $CNF['ICON']));
     // add replaceable markers
     $this->addMarkers($this->_aProfileInfo);
     // every content field can be used as marker
     $this->addMarkers(array('profile_id' => $this->_oProfile->id()));
     // profile id field
     $this->addMarkers(array('display_name' => $this->_oProfile->getDisplayName()));
     // profile display name
     $this->addMarkers(array('profile_link' => $this->_oProfile->getUrl()));
     // profile link
     // display message if profile isn't active
     if (bx_get_logged_profile_id() == $this->_oProfile->id() && !empty($CNF['INFORMERS']['status'])) {
         $sStatus = $this->_aContentInfo['profile_status'];
         if (isset($CNF['INFORMERS']['status']['map'][$sStatus])) {
             $aInformers[] = array('name' => $CNF['INFORMERS']['status']['name'], 'msg' => _t($CNF['INFORMERS']['status']['map'][$sStatus]), 'type' => BX_INFORMER_ALERT);
         }
     }
     // display message if it is possible to switch to this profile
     $oProfile = $this->_aContentInfo ? BxDolProfile::getInstanceByContentTypeAccount($this->_aContentInfo['id'], $this->MODULE) : false;
     if ($oProfile) {
         $oProfile->checkSwitchToProfile($this->_oTemplate);
     }
     // add informers
     if ($aInformers) {
         $oInformer = BxDolInformer::getInstance($this->_oTemplate);
         if ($oInformer) {
             foreach ($aInformers as $a) {
                 $oInformer->add($a['name'], $this->_replaceMarkers($a['msg']), $a['type']);
             }
         }
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:55,代码来源:BxBaseModProfilePageEntry.php


示例10: __construct

 public function __construct($aObject, $oTemplate)
 {
     parent::__construct($aObject, $oTemplate);
     // set dashboard submenu
     bx_import('BxDolMenu');
     bx_import('BxDolPermalinks');
     $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
     if ($oMenuSubmenu) {
         $oMenuSubmenu->setObjectSubmenu('sys_account_dashboard_submenu', array('title' => _t('_sys_menu_item_title_account_dashboard'), 'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=dashboard'), 'icon' => ''));
     }
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:11,代码来源:BxBasePageDashboard.php


示例11: PageCompMainCode

/**
 * page code function
 */
function PageCompMainCode()
{
    ob_start();
    $oMenu = BxDolMenu::getObjectInstance('samples');
    // it automatically creates instance of default or custom class by object name
    if ($oMenu) {
        echo $oMenu->getCode();
    }
    // print menu object
    return DesignBoxContent("Sample menu", ob_get_clean(), BX_DB_PADDING_DEF);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:14,代码来源:menu.php


示例12: _getActionSettings

 protected function _getActionSettings($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
 {
     $sJsObject = $this->_oModule->_oConfig->getJsObject('manage_tools');
     $sMenuName = $this->_oModule->_oConfig->CNF['OBJECT_MENU_MANAGE_TOOLS'];
     bx_import('BxDolMenu');
     $sMenu = BxDolMenu::getObjectInstance($sMenuName)->getCode();
     if (empty($sMenu)) {
         return '';
     }
     $a['attr'] = array_merge($a['attr'], array("bx-popup-id" => $sMenuName . "-" . $aRow['id'], "onclick" => "\$(this).off('click'); " . $sJsObject . ".onClickSettings('" . $sMenuName . "', this);"));
     return $this->_getActionDefault($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:12,代码来源:BxBaseModGeneralGridAdministration.php


示例13: setSubmenu

 public function setSubmenu($sSelected)
 {
     $oSubmenuSystem = BxDolMenu::getObjectInstance('sys_site_submenu');
     if (!$oSubmenuSystem) {
         return;
     }
     $CNF =& $this->_oConfig->CNF;
     $oSubmenuSystem->setObjectSubmenu($CNF['OBJECT_MENU_SUBMENU'], array('title' => _t('_bx_ntfs'), 'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']), 'icon' => ''));
     $oSubmenuModule = BxDolMenu::getObjectInstance($CNF['OBJECT_MENU_SUBMENU']);
     if ($oSubmenuModule) {
         $oSubmenuModule->setSelected($this->_oConfig->getName(), $sSelected);
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:13,代码来源:BxNtfsModule.php


示例14: BxBaseMenu

 function BxBaseMenu()
 {
     BxDolMenu::BxDolMenu();
     $this->iElementsCntInLine = (int) getParam('nav_menu_elements_on_line_' . (isLogged() ? 'usr' : 'gst'));
     $this->sSiteUrl = BX_DOL_URL_ROOT;
     $this->iJumpedMenuID = 0;
     $this->sCustomSubIconUrl = '';
     $this->sCustomSubHeader = '';
     $this->sCustomActions = '';
     $this->sBreadCrumb = '';
     $this->bDebugMode = false;
     $this->sWidth = $GLOBALS['oSysTemplate']->getPageWidth();
 }
开发者ID:Arvindvi,项目名称:dolphin,代码行数:13,代码来源:BxBaseMenu.php


示例15: setModuleSubmenu

 public function setModuleSubmenu($iCurrentFolderId = 0)
 {
     $CNF =& $this->_oConfig->CNF;
     $aMapFolderId2MenuName = array(BX_CNV_FOLDER_INBOX => 'convos-folder-inbox', BX_CNV_FOLDER_DRAFTS => 'convos-drafts', BX_CNV_FOLDER_SPAM => 'convos-spam', BX_CNV_FOLDER_TRASH => 'convos-trash');
     $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
     if (!$oMenuSubmenu) {
         return;
     }
     $oMenuSubmenu->setObjectSubmenu($CNF['OBJECT_MENU_SUBMENU'], array('title' => _t('_bx_cnv'), 'link' => BX_DOL_URL_ROOT . $CNF['URL_HOME'], 'icon' => ''));
     $oMenuModule = BxDolMenu::getObjectInstance($CNF['OBJECT_MENU_SUBMENU']);
     if ($oMenuModule && isset($aMapFolderId2MenuName[$iCurrentFolderId])) {
         $oMenuModule->setSelected($this->_aModule['name'], $aMapFolderId2MenuName[$iCurrentFolderId]);
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:14,代码来源:BxCnvModule.php


示例16: enable

 function enable($aParams)
 {
     $aResult = parent::enable($aParams);
     if (!$aResult['result']) {
         // proces further only in case of successful enable
         return $aResult;
     }
     BxDolImageTranscoder::registerHandlersArray($this->_aTranscoders);
     if ($this->_aMenuTriggers) {
         bx_import('BxDolMenu');
         foreach ($this->_aMenuTriggers as $sMenuTriggerName) {
             BxDolMenu::processMenuTrigger($sMenuTriggerName);
         }
     }
     return $aResult;
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:16,代码来源:BxBaseModGeneralInstaller.php


示例17: serviceProfileNotifications

 public function serviceProfileNotifications($iProfileId = 0)
 {
     if (!$iProfileId) {
         $iProfileId = bx_get_logged_profile_id();
     }
     bx_import('BxDolMenu');
     $oMenu = BxDolMenu::getObjectInstance('sys_account_notifications');
     $iNum = 0;
     $aMenuItems = $oMenu->getMenuItems();
     foreach ($aMenuItems as $r) {
         if (isset($r['bx_if:addon']) && $r['bx_if:addon']['condition']) {
             $iNum += $r['bx_if:addon']['content']['addon'];
         }
     }
     return $iNum;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:16,代码来源:BxBaseServiceProfiles.php


示例18: __construct

 public function __construct($aObject, $oTemplate = false)
 {
     parent::__construct($aObject, $oTemplate);
     $CNF =& $this->_oModule->_oConfig->CNF;
     // select view entry submenu
     $oMenuSumbemu = BxDolMenu::getObjectInstance('sys_site_submenu');
     $oMenuSumbemu->setObjectSubmenu($CNF['OBJECT_MENU_SUBMENU_VIEW_ENTRY'], $CNF['OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION']);
     $iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
     if ($iContentId) {
         $this->_aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);
     }
     if ($this->_aContentInfo) {
         $this->addMarkers($this->_aContentInfo);
         // every field can be used as marker
         $this->addMarkers(array('title' => strmaxtextlen($this->_aContentInfo[$CNF['FIELD_TEXT']], 20, '...')));
     }
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:17,代码来源:BxBaseModTextPageEntry.php


示例19: __construct

 public function __construct($aObject, $oTemplate = false)
 {
     parent::__construct($aObject, $oTemplate);
     $CNF =& $this->_oModule->_oConfig->CNF;
     $iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
     if ($iContentId) {
         $this->_aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);
     }
     if ($this->_aContentInfo) {
         $sTitle = isset($this->_aContentInfo[$CNF['FIELD_TITLE']]) ? $this->_aContentInfo[$CNF['FIELD_TITLE']] : strmaxtextlen($this->_aContentInfo[$CNF['FIELD_TEXT']], 20, '...');
         $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $this->_aContentInfo[$CNF['FIELD_ID']]);
         $this->addMarkers($this->_aContentInfo);
         // every field can be used as marker
         $this->addMarkers(array('title' => $sTitle, 'entry_link' => $sUrl));
         // select view entry submenu
         $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
         $oMenuSubmenu->setObjectSubmenu($CNF['OBJECT_MENU_SUBMENU_VIEW_ENTRY'], array('title' => $sTitle, 'link' => $sUrl, 'icon' => $CNF['ICON']));
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:19,代码来源:BxBaseModTextPageEntry.php


示例20: __construct

 public function __construct($aObject, $oTemplate)
 {
     parent::__construct($aObject, $oTemplate);
     bx_import('BxDolProfile');
     $oProfile = BxDolProfile::getInstance();
     $aProfileInfo = $oProfile ? $oProfile->getInfo() : false;
     $this->addMarkers(array('account_id' => $aProfileInfo ? $aProfileInfo['account_id'] : 0, 'profile_id' => $aProfileInfo ? $aProfileInfo['id'] : 0, 'profile_type' => $aProfileInfo ? $aProfileInfo['type'] : 0, 'profile_content_id' => $aProfileInfo ? $aProfileInfo['content_id'] : 0));
     // set settings submenu
     bx_import('BxDolMenu');
     $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
     if ($oMenuSubmenu) {
         $oMenuSubmenu->setObjectSubmenu('sys_account_settings_submenu', array('title' => _t('_sys_menu_item_title_account_settings'), 'link' => BX_DOL_URL_ROOT . 'member.php', 'icon' => ''));
     }
     // display message if profile isn't active
     if ($oProfile) {
         $sStatus = $oProfile->getStatus();
         if (isset($this->_aMapStatus2LangKey[$sStatus])) {
             bx_import('BxDolInformer');
             $oInformer = BxDolInformer::getInstance($this->_oTemplate);
             if ($oInformer) {
                 $oInformer->add('sys-account-status-not-active', _t($this->_aMapStatus2LangKey[$sStatus]), BX_INFORMER_ALERT);
             }
         }
     }
     // switch profile context
     if ($iSwitchToProfileId = (int) bx_get('switch_to_profile')) {
         bx_import('BxDolInformer');
         $oInformer = BxDolInformer::getInstance($this->_oTemplate);
         $oProfile = BxDolProfile::getInstance($iSwitchToProfileId);
         $sInformerMsg = '';
         if ($oProfile && $oProfile->getAccountId() == getLoggedId()) {
             bx_import('BxDolProfile');
             $oAccount = BxDolAccount::getInstance();
             if ($oAccount->updateProfileContext($iSwitchToProfileId)) {
                 $sInformerMsg = _t('_sys_txt_account_profile_context_changed_success', $oProfile->getDisplayName());
             }
         }
         if ($oInformer) {
             $oInformer->add('sys-account-profile-context-change-result', $sInformerMsg ? $sInformerMsg : _t('_error occured'), $sInformerMsg ? BX_INFORMER_INFO : BX_INFORMER_ERROR);
         }
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:42,代码来源:BxBasePageAccount.php



注:本文中的BxDolMenu类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BxDolModule类代码示例发布时间:2022-05-23
下一篇:
PHP BxDolInstaller类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap