當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FWUser::showBirthdayUsers方法代碼示例

本文整理匯總了PHP中FWUser::showBirthdayUsers方法的典型用法代碼示例。如果您正苦於以下問題:PHP FWUser::showBirthdayUsers方法的具體用法?PHP FWUser::showBirthdayUsers怎麽用?PHP FWUser::showBirthdayUsers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FWUser的用法示例。


在下文中一共展示了FWUser::showBirthdayUsers方法的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::showBirthdayUsers方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。