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


PHP Core_Model_Item_Abstract::getAdminList方法代碼示例

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


在下文中一共展示了Core_Model_Item_Abstract::getAdminList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getActivityAbout


//.........這裏部分代碼省略.........
         }
     }
     $member_ids = array();
     if ($actionFilter == 'owner') {
         if ($about instanceof User_Model_User) {
             $member_ids[] = $about->getIdentity();
         } elseif ($about instanceof Group_Model_Group || $about instanceof Advgroup_Model_Group) {
             $objectParent = $about->getParent('user');
             if ($objectParent instanceof User_Model_User) {
                 $member_ids[] = $objectParent->getIdentity();
             }
         } else {
             $objectParent = $about->getParent('user');
             if ($objectParent instanceof User_Model_User) {
                 $member_ids[] = $objectParent->getIdentity();
             }
         }
     } elseif ($actionFilter == 'officers') {
         if ($about instanceof Group_Model_Group || $about instanceof Advgroup_Model_Group) {
             $objectParent = $about->getParent('user');
             if ($objectParent instanceof User_Model_User) {
                 $member_ids[] = $objectParent->getIdentity();
             }
             foreach ($about->getOfficerList()->getAll() as $value) {
                 $member_ids[] = $value->child_id;
             }
         }
     } elseif ($actionFilter == 'admins') {
         if ($about instanceof Ynbusinesspages_Model_Business) {
             $objectParent = $about->getParent('user');
             if ($objectParent instanceof User_Model_User) {
                 $member_ids[] = $objectParent->getIdentity();
             }
             foreach ($about->getAdminList()->getAll() as $value) {
                 $member_ids[] = $value->child_id;
             }
         }
     } elseif ($actionFilter == 'membership') {
         if (in_array($about->getType(), array('event', 'group', 'ynbusinesspages_business'))) {
             $members = $about->membership()->getMembers(true);
             foreach ($members as $member) {
                 $member_ids[] = $member->getIdentity();
             }
         } else {
             $member_ids = $user->membership()->getMembershipsOfIds();
         }
         if (empty($member_ids)) {
             return array();
         }
     }
     foreach ($responses as $response) {
         if (empty($response)) {
             continue;
         }
         // Target info
         $select = $streamTable->select()->from($streamTable->info('name'), 'action_id')->where('target_type = ?', $response['type']);
         if (empty($response['data'])) {
             // Simple
             $select->where('target_id = ?', 0);
         } else {
             if (is_scalar($response['data']) || count($response['data']) === 1) {
                 // Single
                 if (is_array($response['data'])) {
                     list($response['data']) = $response['data'];
                 }
                 $select->where('target_id = ?', $response['data']);
開發者ID:hoalangoc,項目名稱:ftf,代碼行數:67,代碼來源:Actions.php


注:本文中的Core_Model_Item_Abstract::getAdminList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。