I'm writing a WordPress plugin to display a list of CiviCRM Events, but I'm having a difficult time figuring out how to obtain the label for the event type. I can retrieve the list of events, and the event_type_id
, but I haven't figured out how to retrieve the label for the event type.
$eventList = CRM_Event_BAO_Event::getCompleteInfo();
foreach ( $eventList as $event ) {
// Upon further testing, the following returns a blank
$type = CRM_Utils_Array::value( 'event_type_id', $event );
$typeLabel = // This is where it falls apart...
}