本文整理匯總了PHP中CRM_Activity_DAO_Activity::export方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Activity_DAO_Activity::export方法的具體用法?PHP CRM_Activity_DAO_Activity::export怎麽用?PHP CRM_Activity_DAO_Activity::export使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRM_Activity_DAO_Activity
的用法示例。
在下文中一共展示了CRM_Activity_DAO_Activity::export方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
/**
* Get the exportable fields for Activities.
*
* @param string $name
* If it is called by case $name = Case else $name = Activity.
*
* @return array
* array of exportable Fields
*/
public static function &exportableFields($name = 'Activity')
{
if (!isset(self::$_exportableFields[$name])) {
self::$_exportableFields[$name] = array();
// TODO: ideally we should retrieve all fields from xml, in this case since activity processing is done
// my case hence we have defined fields as case_*
if ($name == 'Activity') {
$exportableFields = CRM_Activity_DAO_Activity::export();
$exportableFields['source_contact_id']['title'] = ts('Source Contact ID');
$exportableFields['source_contact'] = array('title' => ts('Source Contact'), 'type' => CRM_Utils_Type::T_STRING);
$Activityfields = array('activity_type' => array('title' => ts('Activity Type'), 'name' => 'activity_type', 'type' => CRM_Utils_Type::T_STRING, 'searchByLabel' => TRUE), 'activity_status' => array('title' => ts('Activity Status'), 'name' => 'activity_status', 'type' => CRM_Utils_Type::T_STRING, 'searchByLabel' => TRUE));
$fields = array_merge($Activityfields, $exportableFields);
} else {
// Set title to activity fields.
$fields = array('case_activity_subject' => array('title' => ts('Activity Subject'), 'type' => CRM_Utils_Type::T_STRING), 'case_source_contact_id' => array('title' => ts('Activity Reporter'), 'type' => CRM_Utils_Type::T_STRING), 'case_recent_activity_date' => array('title' => ts('Activity Actual Date'), 'type' => CRM_Utils_Type::T_DATE), 'case_scheduled_activity_date' => array('title' => ts('Activity Scheduled Date'), 'type' => CRM_Utils_Type::T_DATE), 'case_recent_activity_type' => array('title' => ts('Activity Type'), 'type' => CRM_Utils_Type::T_STRING), 'case_activity_status' => array('title' => ts('Activity Status'), 'type' => CRM_Utils_Type::T_STRING), 'case_activity_duration' => array('title' => ts('Activity Duration'), 'type' => CRM_Utils_Type::T_INT), 'case_activity_medium_id' => array('title' => ts('Activity Medium'), 'type' => CRM_Utils_Type::T_INT), 'case_activity_details' => array('title' => ts('Activity Details'), 'type' => CRM_Utils_Type::T_TEXT), 'case_activity_is_auto' => array('title' => ts('Activity Auto-generated?'), 'type' => CRM_Utils_Type::T_BOOLEAN));
}
// add custom data for case activities
$fields = array_merge($fields, CRM_Core_BAO_CustomField::getFieldsForImport('Activity'));
self::$_exportableFields[$name] = $fields;
}
return self::$_exportableFields[$name];
}