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


PHP XenForo_Template_Helper_Core::setDisplayStyles方法代码示例

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


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

示例1: _handleCustomPreloadedData

 /**
  * Handles the custom data that needs to be preloaded.
  *
  * @param array $data Data that was loaded. Unsuccessfully loaded items will have a value of null
  */
 protected function _handleCustomPreloadedData(array &$data)
 {
     if (!is_array($data['routesPublic'])) {
         $data['routesPublic'] = XenForo_Model::create('XenForo_Model_RoutePrefix')->rebuildRoutePrefixTypeCache('public');
     }
     XenForo_Link::setHandlerInfoForGroup('public', $data['routesPublic']);
     if (!is_array($data['bannedIps'])) {
         $data['bannedIps'] = XenForo_Model::create('XenForo_Model_Banning')->rebuildBannedIpCache();
     }
     XenForo_Application::set('bannedIps', $data['bannedIps']);
     if (!is_array($data['discouragedIps'])) {
         $data['discouragedIps'] = XenForo_Model::create('XenForo_Model_Banning')->rebuildDiscouragedIpCache();
     }
     XenForo_Application::set('discouragedIps', $data['discouragedIps']);
     if (!is_array($data['styles'])) {
         $data['styles'] = XenForo_Model::create('XenForo_Model_Style')->rebuildStyleCache();
     }
     XenForo_Application::set('styles', $data['styles']);
     if (!is_array($data['nodeTypes'])) {
         $data['nodeTypes'] = XenForo_Model::create('XenForo_Model_Node')->rebuildNodeTypeCache();
     }
     XenForo_Application::set('nodeTypes', $data['nodeTypes']);
     if (!is_array($data['smilies'])) {
         $data['smilies'] = XenForo_Model::create('XenForo_Model_Smilie')->rebuildSmilieCache();
     }
     XenForo_Application::set('smilies', $data['smilies']);
     if (!is_array($data['bbCode'])) {
         $data['bbCode'] = XenForo_Model::create('XenForo_Model_BbCode')->rebuildBbCodeCache();
     }
     XenForo_Application::set('bbCode', $data['bbCode']);
     if (!is_array($data['displayStyles'])) {
         $data['displayStyles'] = XenForo_Model::create('XenForo_Model_UserGroup')->rebuildDisplayStyleCache();
     }
     XenForo_Application::set('displayStyles', $data['displayStyles']);
     XenForo_Template_Helper_Core::setDisplayStyles($data['displayStyles']);
     if (!is_array($data['trophyUserTitles'])) {
         $data['trophyUserTitles'] = XenForo_Model::create('XenForo_Model_Trophy')->rebuildTrophyUserTitleCache();
     }
     XenForo_Application::set('trophyUserTitles', $data['trophyUserTitles']);
     XenForo_Template_Helper_Core::setUserTitles($data['trophyUserTitles']);
     if (is_array($data['reportCounts'])) {
         XenForo_Application::set('reportCounts', $data['reportCounts']);
     }
     if (is_array($data['moderationCounts'])) {
         XenForo_Application::set('moderationCounts', $data['moderationCounts']);
     }
 }
开发者ID:hahuunguyen,项目名称:DTUI_201105,代码行数:52,代码来源:Public.php

示例2: _handleCustomPreloadedData

 /**
  * Handles the custom data that needs to be preloaded.
  *
  * @param array $data Data that was loaded. Unsuccessfully loaded items will have a value of null
  */
 protected function _handleCustomPreloadedData(array &$data)
 {
     if (!is_array($data['routesPublic'])) {
         $data['routesPublic'] = XenForo_Model::create('XenForo_Model_RoutePrefix')->rebuildRoutePrefixTypeCache('public');
     }
     XenForo_Link::setHandlerInfoForGroup('public', $data['routesPublic']);
     if (!is_array($data['bannedIps']) || !isset($data['bannedIps']['version'])) {
         $data['bannedIps'] = XenForo_Model::create('XenForo_Model_Banning')->rebuildBannedIpCache();
     }
     XenForo_Application::set('bannedIps', $data['bannedIps']);
     if (!is_array($data['discouragedIps']) || !isset($data['discouragedIps']['version'])) {
         $data['discouragedIps'] = XenForo_Model::create('XenForo_Model_Banning')->rebuildDiscouragedIpCache();
     }
     XenForo_Application::set('discouragedIps', $data['discouragedIps']);
     if (!is_array($data['styles'])) {
         $data['styles'] = XenForo_Model::create('XenForo_Model_Style')->rebuildStyleCache();
     }
     XenForo_Application::set('styles', $data['styles']);
     if (!is_array($data['nodeTypes'])) {
         $data['nodeTypes'] = XenForo_Model::create('XenForo_Model_Node')->rebuildNodeTypeCache();
     }
     XenForo_Application::set('nodeTypes', $data['nodeTypes']);
     if (!is_array($data['smilies'])) {
         $data['smilies'] = XenForo_Model::create('XenForo_Model_Smilie')->rebuildSmilieCache();
     }
     XenForo_Application::set('smilies', $data['smilies']);
     if (!is_array($data['bbCode'])) {
         $data['bbCode'] = XenForo_Model::create('XenForo_Model_BbCode')->rebuildBbCodeCache();
     }
     XenForo_Application::set('bbCode', $data['bbCode']);
     if (!is_array($data['threadPrefixes'])) {
         $data['threadPrefixes'] = XenForo_Model::create('XenForo_Model_ThreadPrefix')->rebuildPrefixCache();
     }
     XenForo_Application::set('threadPrefixes', $data['threadPrefixes']);
     XenForo_Template_Helper_Core::setThreadPrefixes($data['threadPrefixes']);
     if (!is_array($data['displayStyles'])) {
         $data['displayStyles'] = XenForo_Model::create('XenForo_Model_UserGroup')->rebuildDisplayStyleCache();
     }
     XenForo_Application::set('displayStyles', $data['displayStyles']);
     XenForo_Template_Helper_Core::setDisplayStyles($data['displayStyles']);
     if (!is_array($data['userBanners'])) {
         $data['userBanners'] = XenForo_Model::create('XenForo_Model_UserGroup')->rebuildUserBannerCache();
     }
     XenForo_Application::set('userBanners', $data['userBanners']);
     XenForo_Template_Helper_Core::setUserBanners($data['userBanners']);
     if (!is_array($data['userTitleLadder'])) {
         $data['userTitleLadder'] = XenForo_Model::create('XenForo_Model_UserTitleLadder')->rebuildUserTitleLadderCache();
     }
     XenForo_Application::set('userTitleLadder', $data['userTitleLadder']);
     XenForo_Template_Helper_Core::setUserTitles($data['userTitleLadder'], XenForo_Application::getOptions()->userTitleLadderField);
     if (!is_array($data['notices'])) {
         $data['notices'] = XenForo_Model::create('XenForo_Model_Notice')->rebuildNoticeCache();
     }
     XenForo_Application::set('notices', $data['notices']);
     if (!is_array($data['userFieldsInfo'])) {
         $data['userFieldsInfo'] = XenForo_Model::create('XenForo_Model_UserField')->rebuildUserFieldCache();
     }
     XenForo_Application::set('userFieldsInfo', $data['userFieldsInfo']);
     if (is_array($data['reportCounts'])) {
         XenForo_Application::set('reportCounts', $data['reportCounts']);
     }
     if (is_array($data['moderationCounts'])) {
         XenForo_Application::set('moderationCounts', $data['moderationCounts']);
     }
     if (is_array($data['userModerationCounts'])) {
         XenForo_Application::set('userModerationCounts', $data['userModerationCounts']);
     }
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:73,代码来源:Public.php


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