}
$contactTypes = CRM_Contact_BAO_ContactType::basicTypeInfo(TRUE);
+ $contactTypes = array_merge($contactTypes, array('Event' => 1));
+
if ($entityType != 'Contact' && !array_key_exists($entityType, $contactTypes)) {
throw new CRM_Core_Exception('Invalid Entity Filter');
}
$subTypes = CRM_Contact_BAO_ContactType::subTypeInfo($entityType, TRUE);
+ $subTypes = array_merge($subTypes, CRM_Event_PseudoConstant::eventType());
if (!array_key_exists($subType, $subTypes)) {
throw new CRM_Core_Exception('Invalid Filter');
}
*/
public function testGetTreeEventSubTypeAlphabetical() {
$eventType = $this->callAPISuccess('OptionValue', 'Create', array('option_group_id' => 'event_type', 'value' => 'meeting', 'label' => 'Meeting'));
- $customGroup = $this->CustomGroupCreate(array('extends' => 'Event', 'extends_entity_column_value' => array('meeting')));
+ $customGroup = $this->CustomGroupCreate(array('extends' => 'Event', 'extends_entity_column_value' => array('Meeting')));
$customField = $this->customFieldCreate(array('custom_group_id' => $customGroup['id']));
$result1 = CRM_Core_BAO_CustomGroup::getTree('Event', NULL, NULL, NULL, CRM_Core_DAO::VALUE_SEPARATOR . 'meeting' . CRM_Core_DAO::VALUE_SEPARATOR);
$this->assertEquals('Custom Field', $result1[$customGroup['id']]['fields'][$customField['id']]['label']);