'entity_id' => $contact->id,
'entity_table' => 'civicrm_contact',
'note' => $note['note'],
- 'subject' => CRM_Utils_Array::value('subject', $note),
+ 'subject' => $note['subject'] ?? NULL,
'contact_id' => $contactId,
];
CRM_Core_BAO_Note::add($noteParams);
'entity_id' => $contact->id,
'entity_table' => 'civicrm_contact',
'note' => $params['note'],
- 'subject' => CRM_Utils_Array::value('subject', $params),
+ 'subject' => $params['subject'] ?? NULL,
'contact_id' => $contactId,
];
CRM_Core_BAO_Note::add($noteParams);
//lookup value of email/postal greeting, addressee, CRM-4575
foreach (self::$_greetingTypes as $greeting) {
$filterCondition = [
- 'contact_type' => CRM_Utils_Array::value('contact_type', $defaults),
+ 'contact_type' => $defaults['contact_type'] ?? NULL,
'greeting_type' => $greeting,
];
CRM_Utils_Array::lookupValue($defaults, $greeting,
$contextMenu['primaryActions'][$key] = [
'title' => $values['title'],
'ref' => $values['ref'],
- 'class' => CRM_Utils_Array::value('class', $values),
+ 'class' => $values['class'] ?? NULL,
'key' => $values['key'],
];
continue;
$contextMenu['moreActions'][$values['weight']] = [
'title' => $values['title'],
'ref' => $values['ref'],
- 'href' => CRM_Utils_Array::value('href', $values),
- 'tab' => CRM_Utils_Array::value('tab', $values),
- 'class' => CRM_Utils_Array::value('class', $values),
+ 'href' => $values['href'] ?? NULL,
+ 'tab' => $values['tab'] ?? NULL,
+ 'class' => $values['class'] ?? NULL,
'key' => $values['key'],
];
}
$contextMenu['otherActions'][$value['weight']] = [
'title' => $value['title'],
'ref' => $value['ref'],
- 'href' => CRM_Utils_Array::value('href', $value),
- 'tab' => CRM_Utils_Array::value('tab', $value),
- 'class' => CRM_Utils_Array::value('class', $value),
- 'icon' => CRM_Utils_Array::value('icon', $value),
+ 'href' => $value['href'] ?? NULL,
+ 'tab' => $value['tab'] ?? NULL,
+ 'class' => $value['class'] ?? NULL,
+ 'icon' => $value['icon'] ?? NULL,
'key' => $value['key'],
];
}