X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FActionMapping.php;h=6f50a0b44493f88abb710394a358ed08cde36f2b;hb=d880d1db343ce51a575d446d2748e3e1e5468277;hp=b0425ebc16826ed58b268cd62ce6988e2ba2259b;hpb=d1c0c69c2308d8582cc135df5f40688768c6b11b;p=civicrm-core.git diff --git a/CRM/Event/ActionMapping.php b/CRM/Event/ActionMapping.php index b0425ebc16..6f50a0b444 100644 --- a/CRM/Event/ActionMapping.php +++ b/CRM/Event/ActionMapping.php @@ -1,7 +1,7 @@ ts('Event Type'), 'entity_status' => 'civicrm_participant_status_type', 'entity_status_label' => ts('Participant Status'), - 'entity_date_start' => 'event_start_date', - 'entity_date_end' => 'event_end_date', ))); $registrations->register(CRM_Event_ActionMapping::create(array( 'id' => CRM_Event_ActionMapping::EVENT_NAME_MAPPING_ID, @@ -72,8 +70,6 @@ class CRM_Event_ActionMapping extends \Civi\ActionSchedule\Mapping { 'entity_value_label' => ts('Event Name'), 'entity_status' => 'civicrm_participant_status_type', 'entity_status_label' => ts('Participant Status'), - 'entity_date_start' => 'event_start_date', - 'entity_date_end' => 'event_end_date', ))); $registrations->register(CRM_Event_ActionMapping::create(array( 'id' => CRM_Event_ActionMapping::EVENT_TPL_MAPPING_ID, @@ -83,11 +79,24 @@ class CRM_Event_ActionMapping extends \Civi\ActionSchedule\Mapping { 'entity_value_label' => ts('Event Template'), 'entity_status' => 'civicrm_participant_status_type', 'entity_status_label' => ts('Participant Status'), - 'entity_date_start' => 'event_start_date', - 'entity_date_end' => 'event_end_date', ))); } + /** + * Get a list of available date fields. + * + * @return array + * Array(string $fieldName => string $fieldLabel). + */ + public function getDateFields() { + return array( + 'start_date' => ts('Event Start Date'), + 'end_date' => ts('Event End Date'), + 'registration_start_date' => ts('Registration Start Date'), + 'registration_end_date' => ts('Registration End Date'), + ); + } + /** * Get a list of recipient types. *