Skip to content
Snippets Groups Projects
Commit 6a2697ff authored by jaapjansma's avatar jaapjansma
Browse files

changed behaviour of case trigger made it simpler

parent ce5bc983
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,6 @@ class CRM_CivirulesPostTrigger_Case extends CRM_Civirules_Trigger_Post {
*/
protected function getAdditionalEntities() {
$entities = parent::getAdditionalEntities();
$entities[] = new CRM_Civirules_TriggerData_EntityDefinition('CaseRole', 'CivirulesCaseRole', 'CRM_CivirulesPostTrigger_DataSpecification_CaseRole', 'CaseRole');
$entities[] = new CRM_Civirules_TriggerData_EntityDefinition('Relationship', 'Relationship', 'CRM_Contact_DAO_Relationship' , 'Relationship');
return $entities;
}
......
<?php
/**
* CiviRuleRule.Get API
*
* @param array $params
* @return array API result descriptor
* @see civicrm_api3_create_success
* @see civicrm_api3_create_error
* @throws API_Exception
*/
function civicrm_api3_civirules_case_role_getoptions($params) {
if (!empty($params['field']) && $params['field'] == 'is_client') {
$data[] = array(
'key' => '0',
'value' => ts('No')
);
$data[] = array(
'key' => '1',
'value' => ts('Yes'),
);
return civicrm_api3_create_success($data, $params, 'CivirulesCaseRole', 'Getoptions');
}
return civicrm_api3_create_error('Non existings field');
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment