当前位置: 首页>>代码示例>>PHP>>正文


PHP BxDolTemplate::processInjection方法代码示例

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


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

示例1: parseSystemKey


//.........这里部分代码省略.........
     global $oTemplConfig;
     global $logged;
     $aKeyWrappers = $this->_getKeyWrappers($mixedKeyWrapperHtml);
     $sRet = '';
     switch ($sKey) {
         case 'page_charset':
             $sRet = 'UTF-8';
             break;
         case 'page_keywords':
             if (!empty($GLOBALS[$this->_sPrefix . 'PageKeywords']) && is_array($GLOBALS[$this->_sPrefix . 'PageKeywords'])) {
                 $sRet = '<meta name="keywords" content="' . bx_html_attribute(implode(',', $GLOBALS[$this->_sPrefix . 'PageKeywords'])) . '" />';
             }
             break;
         case 'page_description':
             if (!empty($GLOBALS[$this->_sPrefix . 'PageDescription']) && is_string($GLOBALS[$this->_sPrefix . 'PageDescription'])) {
                 $sRet = '<meta name="description" content="' . bx_html_attribute($GLOBALS[$this->_sPrefix . 'PageDescription']) . '" />';
             }
             break;
         case 'page_header':
             if (!empty($GLOBALS[$this->_sPrefix . 'PageTitle'])) {
                 $sRet = $GLOBALS[$this->_sPrefix . 'PageTitle'];
             } else {
                 if (isset($_page['header'])) {
                     $sRet = $_page['header'];
                 }
             }
             //$sRet = process_line_output($sRet);
             break;
         case 'page_header_text':
             if (!empty($GLOBALS[$this->_sPrefix . 'PageMainBoxTitle'])) {
                 $sRet = $GLOBALS[$this->_sPrefix . 'PageMainBoxTitle'];
             } else {
                 if (isset($_page['header_text'])) {
                     $sRet = $_page['header_text'];
                 }
             }
             //$sRet = process_line_output($sRet);
             break;
         case 'main_div_width':
             if (!empty($GLOBALS[$this->_sPrefix . 'PageWidth'])) {
                 $sRet = process_line_output($GLOBALS[$this->_sPrefix . 'PageWidth']);
             }
             break;
         case 'main_logo':
             $sRet = $GLOBALS['oFunctions']->genSiteLogo();
             break;
         case 'main_splash':
             $sRet = $GLOBALS['oFunctions']->genSiteSplash();
             break;
         case 'top_menu':
             $sRet = $GLOBALS['oTopMenu']->getCode();
             break;
         case 'top_menu_breadcrumb':
             $sRet = !empty($GLOBALS['oTopMenu']->sBreadCrumb) ? $GLOBALS['oTopMenu']->sBreadCrumb : $GLOBALS['oTopMenu']->genBreadcrumb();
             break;
         case 'extra_top_menu':
             $iProfileId = getLoggedId();
             if ($iProfileId && getParam('ext_nav_menu_enabled')) {
                 bx_import('BxTemplMemberMenu');
                 $oMemberMenu = new BxTemplMemberMenu();
                 $sRet = $oMemberMenu->genMemberMenu($iProfileId);
             }
             break;
         case 'bottom_links':
             $sRet = $oFunctions->genSiteBottomMenu();
             break;
         case 'switch_skin_block':
             $sRet = getParam("enable_template") ? templates_select_txt() : '';
             break;
         case 'dol_images':
             $sRet = $this->_processJsImages();
             break;
         case 'dol_lang':
             $sRet = $this->_processJsTranslations();
             break;
         case 'dol_options':
             $sRet = $this->_processJsOptions();
             break;
         case 'bottom_text':
             $sRet = _t('_bottom_text', date('Y'));
             break;
         case 'copyright':
             $sRet = _t('_copyright', date('Y')) . getVersionComment();
             break;
         case 'flush_header':
             //TODO: add some variable to disable it if needed
             //flush();
             break;
         case 'extra_js':
             $sRet = empty($_page['extra_js']) ? '' : $_page['extra_js'];
             break;
         case 'is_profile_page':
             $sRet = defined('BX_PROFILE_PAGE') ? 'true' : 'false';
             break;
         default:
             $sRet = ($sTemplAdd = $oFunctions->TemplPageAddComponent($sKey)) !== false ? $sTemplAdd : $aKeyWrappers['left'] . $sKey . $aKeyWrappers['right'];
     }
     $sRet = BxDolTemplate::processInjection($_page['name_index'], $sKey, $sRet);
     return $sRet;
 }
开发者ID:noormcs,项目名称:studoro,代码行数:101,代码来源:BxDolTemplate.php

示例2: parseSystemKey

 /**
  * Parse system keys.
  *
  * @param  string $sKey key
  * @return string value associated with the key.
  */
 function parseSystemKey($sKey, $mixedKeyWrapperHtml = null)
 {
     global $logged;
     $aKeyWrappers = $this->_getKeyWrappers($mixedKeyWrapperHtml);
     $sRet = '';
     switch ($sKey) {
         case 'version':
             $sRet = $GLOBALS['site']['ver'];
             break;
         case 'current_version':
             $sRet = $GLOBALS['site']['ver'] . '.' . $GLOBALS['site']['build'];
             break;
         case 'page_charset':
             $sRet = 'UTF-8';
             break;
         case 'page_keywords':
             if (!empty($GLOBALS[$this->_sPrefix . 'PageKeywords']) && is_array($GLOBALS[$this->_sPrefix . 'PageKeywords'])) {
                 $sRet = '<meta name="keywords" content="' . process_line_output(implode(',', $GLOBALS[$this->_sPrefix . 'PageKeywords'])) . '" />';
             }
             break;
         case 'page_description':
             if (!empty($GLOBALS[$this->_sPrefix . 'PageDescription']) && is_string($GLOBALS[$this->_sPrefix . 'PageDescription'])) {
                 $sRet = '<meta name="description" content="' . process_line_output($GLOBALS[$this->_sPrefix . 'PageDescription']) . '" />';
             }
             break;
         case 'page_header':
             if (!empty($GLOBALS[$this->_sPrefix . 'PageTitle'])) {
                 $sRet = $GLOBALS[$this->_sPrefix . 'PageTitle'];
             } else {
                 if (isset($GLOBALS['_page']['header'])) {
                     $sRet = $GLOBALS['_page']['header'];
                 }
             }
             $sRet = process_line_output($sRet);
             break;
         case 'page_header_text':
             if (!empty($GLOBALS[$this->_sPrefix . 'PageMainBoxTitle'])) {
                 $sRet = process_line_output($GLOBALS[$this->_sPrefix . 'PageMainBoxTitle']);
             } else {
                 if (isset($GLOBALS['_page']['header_text'])) {
                     $sRet = $GLOBALS['_page']['header_text'];
                 }
             }
             $sRet = process_line_output($sRet);
             break;
         case 'main_div_width':
             if (!empty($GLOBALS[$this->_sPrefix . 'PageWidth'])) {
                 $sRet = process_line_output($GLOBALS[$this->_sPrefix . 'PageWidth']);
             }
             break;
         case 'top_menu':
             $sRet = BxDolAdminMenu::getTopMenu();
             break;
         case 'main_menu':
             $sRet = BxDolAdminMenu::getMainMenu();
             break;
         case 'dol_images':
             $sRet = $this->_processJsImages();
             break;
         case 'dol_lang':
             $sRet = $this->_processJsTranslations();
             break;
         case 'dol_options':
             $sRet = $this->_processJsOptions();
             break;
         case 'promo_code':
             if (defined('BX_PROMO_CODE')) {
                 $sRet = BX_PROMO_CODE;
             } else {
                 $sRet = ' ';
             }
             break;
         case 'copyright':
             $sRet = _t('_copyright', date('Y')) . getVersionComment();
             break;
     }
     $sRet = BxDolTemplate::processInjection($GLOBALS['_page']['name_index'], $sKey, $sRet);
     return $sRet;
 }
开发者ID:noormcs,项目名称:studoro,代码行数:85,代码来源:BxDolTemplateAdmin.php


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