X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FCaseContact.php;h=7cd9ecf6690ceebd7234d6a1f7a430305e5f9632;hb=3fe06aa5f4d98f720c452c6e5de07b955b19221b;hp=3072f8869ac1a024c666eed10e49fd302837e908;hpb=ef444b4a23f83a38d8362eb66cd1b06071a7cd1c;p=civicrm-core.git diff --git a/api/v3/CaseContact.php b/api/v3/CaseContact.php index 3072f8869a..7cd9ecf669 100644 --- a/api/v3/CaseContact.php +++ b/api/v3/CaseContact.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2017 | + | Copyright CiviCRM LLC (c) 2004-2019 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -84,19 +84,19 @@ function civicrm_api3_case_contact_delete($params) { * @return array */ function _civicrm_api3_case_contact_getlist_output($result, $request, $entity, $fields) { - $output = array(); + $output = []; if (!empty($result['values'])) { foreach ($result['values'] as $row) { - $data = array( + $data = [ 'id' => $row[$request['id_field']], 'label' => $row[$request['label_field']] . ' - ' . $row['case_id.case_type_id.title'], - ); + ]; $status = CRM_Core_PseudoConstant::getLabel('CRM_Case_BAO_Case', 'status_id', $row['case_id.status_id']); $date = CRM_Utils_Date::customFormat($row['case_id.start_date']); - $data['description'] = array( - "#{$row['case_id']}: $status " . ts('(opened %1)', array(1 => $date)), + $data['description'] = [ + "#{$row['case_id']}: $status " . ts('(opened %1)', [1 => $date]), $row['case_id.subject'], - ); + ]; if (!empty($request['image_field'])) { $data['image'] = isset($row[$request['image_field']]) ? $row[$request['image_field']] : ''; }