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


PHP FWUser::showCurrentlyOnlineUsers方法代码示例

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


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

示例1: postContentLoad

 /**
  * Do something after content is loaded from DB
  *
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function postContentLoad(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     switch ($this->cx->getMode()) {
         case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
             $objTemplate = $this->cx->getTemplate();
             // ACCESS: parse access_logged_in[1-9] and access_logged_out[1-9] blocks
             \FWUser::parseLoggedInOutBlocks($objTemplate);
             // currently online users
             $objAccessBlocks = false;
             if ($objTemplate->blockExists('access_currently_online_member_list')) {
                 if (\FWUser::showCurrentlyOnlineUsers() && ($objTemplate->blockExists('access_currently_online_female_members') || $objTemplate->blockExists('access_currently_online_male_members') || $objTemplate->blockExists('access_currently_online_members'))) {
                     $objAccessBlocks = new AccessBlocks();
                     if ($objTemplate->blockExists('access_currently_online_female_members')) {
                         $objAccessBlocks->setCurrentlyOnlineUsers('female');
                     }
                     if ($objTemplate->blockExists('access_currently_online_male_members')) {
                         $objAccessBlocks->setCurrentlyOnlineUsers('male');
                     }
                     if ($objTemplate->blockExists('access_currently_online_members')) {
                         $objAccessBlocks->setCurrentlyOnlineUsers();
                     }
                 } else {
                     $objTemplate->hideBlock('access_currently_online_member_list');
                 }
             }
             // last active users
             if ($objTemplate->blockExists('access_last_active_member_list')) {
                 if (\FWUser::showLastActivUsers() && ($objTemplate->blockExists('access_last_active_female_members') || $objTemplate->blockExists('access_last_active_male_members') || $objTemplate->blockExists('access_last_active_members'))) {
                     if (!$objAccessBlocks) {
                         $objAccessBlocks = new AccessBlocks();
                     }
                     if ($objTemplate->blockExists('access_last_active_female_members')) {
                         $objAccessBlocks->setLastActiveUsers('female');
                     }
                     if ($objTemplate->blockExists('access_last_active_male_members')) {
                         $objAccessBlocks->setLastActiveUsers('male');
                     }
                     if ($objTemplate->blockExists('access_last_active_members')) {
                         $objAccessBlocks->setLastActiveUsers();
                     }
                 } else {
                     $objTemplate->hideBlock('access_last_active_member_list');
                 }
             }
             // latest registered users
             if ($objTemplate->blockExists('access_latest_registered_member_list')) {
                 if (\FWUser::showLatestRegisteredUsers() && ($objTemplate->blockExists('access_latest_registered_female_members') || $objTemplate->blockExists('access_latest_registered_male_members') || $objTemplate->blockExists('access_latest_registered_members'))) {
                     if (!$objAccessBlocks) {
                         $objAccessBlocks = new AccessBlocks();
                     }
                     if ($objTemplate->blockExists('access_latest_registered_female_members')) {
                         $objAccessBlocks->setLatestRegisteredUsers('female');
                     }
                     if ($objTemplate->blockExists('access_latest_registered_male_members')) {
                         $objAccessBlocks->setLatestRegisteredUsers('male');
                     }
                     if ($objTemplate->blockExists('access_latest_registered_members')) {
                         $objAccessBlocks->setLatestRegisteredUsers();
                     }
                 } else {
                     $objTemplate->hideBlock('access_latest_registered_member_list');
                 }
             }
             // birthday users
             if ($objTemplate->blockExists('access_birthday_member_list')) {
                 if (\FWUser::showBirthdayUsers() && ($objTemplate->blockExists('access_birthday_female_members') || $objTemplate->blockExists('access_birthday_male_members') || $objTemplate->blockExists('access_birthday_members'))) {
                     if (!$objAccessBlocks) {
                         $objAccessBlocks = new AccessBlocks();
                     }
                     if ($objAccessBlocks->isSomeonesBirthdayToday()) {
                         if ($objTemplate->blockExists('access_birthday_female_members')) {
                             $objAccessBlocks->setBirthdayUsers('female');
                         }
                         if ($objTemplate->blockExists('access_birthday_male_members')) {
                             $objAccessBlocks->setBirthdayUsers('male');
                         }
                         if ($objTemplate->blockExists('access_birthday_members')) {
                             $objAccessBlocks->setBirthdayUsers();
                         }
                         $objTemplate->touchBlock('access_birthday_member_list');
                     } else {
                         $objTemplate->hideBlock('access_birthday_member_list');
                     }
                 } else {
                     $objTemplate->hideBlock('access_birthday_member_list');
                 }
             }
             break;
         default:
             break;
     }
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:97,代码来源:ComponentController.class.php


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