'tableName' => 'table_name',
'context' => 'context',
'rel' => 'rel',
- 'contact_sub_type' => 'contact_sub_type'
+ 'contact_sub_type' => 'contact_sub_type',
+ 'contact_type' => 'contact_type'
);
foreach ($whitelist as $key => $param) {
if (!empty($_GET[$key])) {
$where .= " AND cc.contact_sub_type = '{$contactSubType}'";
}
+ if (!empty($params['contact_type'])) {
+ $contactType = CRM_Utils_Type::escape($params['contact_type'], 'String');
+ $where .= " AND cc.contact_type LIKE '{$contactType}'";
+ }
+
//set default for current_employer or return contact with particular id
if (!empty($params['id'])) {
$where .= " AND cc.id = " . (int) $params['id'];