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


PHP CRM_Core_PseudoConstant::activityContacts方法代碼示例

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


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

示例1: getSelection1

 static function getSelection1($id = NULL)
 {
     $mapping = self::getMapping($id);
     $sel4 = $sel5 = array();
     $options = array('manual' => ts('Choose Recipient(s)'), 'group' => ts('Select a Group'));
     $recipientMapping = array_combine(array_keys($options), array_keys($options));
     foreach ($mapping as $value) {
         $entityRecipient = CRM_Utils_Array::value('entity_recipient', $value);
         $key = CRM_Utils_Array::value('id', $value);
         if ($startDate = CRM_Utils_Array::value('entity_date_start', $value)) {
             $sel4[$startDate] = ucwords(str_replace('_', ' ', $startDate));
         }
         if ($endDate = CRM_Utils_Array::value('entity_date_end', $value)) {
             $sel4[$endDate] = ucwords(str_replace('_', ' ', $endDate));
         }
         switch ($entityRecipient) {
             case 'activity_contacts':
                 $activityContacts = CRM_Core_PseudoConstant::activityContacts();
                 $sel5[$id] = $activityContacts + $options;
                 $recipientMapping += CRM_Core_PseudoConstant::activityContacts('name');
                 break;
             case 'event_contacts':
                 $eventContacts = CRM_Core_PseudoConstant::eventContacts();
                 $sel5[$id] = $eventContacts + $options;
                 $recipientMapping += CRM_Core_PseudoConstant::eventContacts('name');
                 break;
             case NULL:
                 $sel5[$id] = $options;
                 break;
         }
     }
     return array('sel4' => $sel4, 'sel5' => $sel5[$id], 'recipientMapping' => $recipientMapping);
 }
開發者ID:peteainsworth,項目名稱:civicrm-4.2.9-drupal,代碼行數:33,代碼來源:ActionSchedule.php

示例2:

 /**
  * Get all Activity Contacts
  *
  * The static array activityContacts is returned
  *
  * @access public
  * @static
  *
  * @param string $column db column name/label.
  *
  * @return array - array reference of all  activity Contacts
  *
  */
 public static function &activityContacts($column = 'label')
 {
     if (!self::$activityContacts) {
         self::$activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, $column);
     }
     return self::$activityContacts;
 }
開發者ID:peteainsworth,項目名稱:civicrm-4.2.9-drupal,代碼行數:20,代碼來源:PseudoConstant.php


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