本文整理匯總了PHP中CRM_Event_PseudoConstant::participantListing方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Event_PseudoConstant::participantListing方法的具體用法?PHP CRM_Event_PseudoConstant::participantListing怎麽用?PHP CRM_Event_PseudoConstant::participantListing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRM_Event_PseudoConstant
的用法示例。
在下文中一共展示了CRM_Event_PseudoConstant::participantListing方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: browse
/**
* Browse all event templates.
*/
public function browse()
{
//get all event templates.
$allEventTemplates = array();
$eventTemplate = new CRM_Event_DAO_Event();
$eventTypes = CRM_Event_PseudoConstant::eventType();
$participantRoles = CRM_Event_PseudoConstant::participantRole();
$participantListings = CRM_Event_PseudoConstant::participantListing();
//find all event templates.
$eventTemplate->is_template = TRUE;
$eventTemplate->find();
while ($eventTemplate->fetch()) {
CRM_Core_DAO::storeValues($eventTemplate, $allEventTemplates[$eventTemplate->id]);
//get listing types.
if ($eventTemplate->participant_listing_id) {
$allEventTemplates[$eventTemplate->id]['participant_listing'] = $participantListings[$eventTemplate->participant_listing_id];
}
//get participant role
if ($eventTemplate->default_role_id) {
$allEventTemplates[$eventTemplate->id]['participant_role'] = $participantRoles[$eventTemplate->default_role_id];
}
//get event type.
if (isset($eventTypes[$eventTemplate->event_type_id])) {
$allEventTemplates[$eventTemplate->id]['event_type'] = $eventTypes[$eventTemplate->event_type_id];
}
//form all action links
$action = array_sum(array_keys($this->links()));
//add action links.
$allEventTemplates[$eventTemplate->id]['action'] = CRM_Core_Action::formLink(self::links(), $action, array('id' => $eventTemplate->id), ts('more'), FALSE, 'eventTemplate.manage.action', 'Event', $eventTemplate->id);
}
$this->assign('rows', $allEventTemplates);
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1&action=browse'));
}
示例2: array
/**
* Get all the participant listings
*
* @access public
*
* @return array - array reference of all participant listings if any
* @static
*/
public static function &participantListing($id = NULL)
{
if (!self::$participantListing) {
self::$participantListing = array();
self::$participantListing = CRM_Core_OptionGroup::values('participant_listing');
}
if ($id) {
return self::$participantListing[$id];
}
return self::$participantListing;
}
示例3: array
/**
* Get all the participant listings
*
* @access public
* @return array - array reference of all participant listings if any
* @static
*/
public static function &participantListing($id = null)
{
if (!self::$participantListing) {
self::$participantListing = array();
require_once "CRM/Core/OptionGroup.php";
self::$participantListing = CRM_Core_OptionGroup::values("participant_listing");
}
if ($id) {
return self::$participantListing[$id];
}
return self::$participantListing;
}