*
* @var array
*/
- public static $_links = NULL;
+ public static $_links;
/**
* The action links that we need to display for the browse screen.
*
* @var string
*/
- protected $_additionalClause = NULL;
+ protected $_additionalClause;
/**
* The query object
*
* @param array $queryParams
* Array of parameters for query.
- * @param \const|int $action - action of search basic or advanced.
+ * @param int $action - action of search basic or advanced.
* @param string $additionalClause
* If the caller wants to further restrict the search (used in participations).
* @param bool $single
'qs' => 'reset=1&action=renew&id=%%id%%&cid=%%cid%%&context=%%cxt%%' . $extraParams,
'ref' => 'restore-case',
'title' => ts('Restore Case'),
+ 'weight' => -30,
],
];
}
'ref' => 'manage-case',
'class' => 'no-popup',
'title' => ts('Manage Case'),
+ 'weight' => -20,
],
CRM_Core_Action::DELETE => [
'name' => ts('Delete'),
'qs' => 'reset=1&action=delete&id=%%id%%&cid=%%cid%%&context=%%cxt%%' . $extraParams,
'ref' => 'delete-case',
'title' => ts('Delete Case'),
+ 'weight' => -10,
],
CRM_Core_Action::UPDATE => [
'name' => ts('Assign to Another Client'),
'ref' => 'reassign',
'class' => 'medium-popup',
'title' => ts('Assign to Another Client'),
+ 'weight' => -10,
],
];
}
$actionLinks = [];
- foreach (self::$_links as $key => $value) {
- $actionLinks['primaryActions'][$key] = $value;
+ foreach (self::$_links as $index => $value) {
+ $actionLinks['primaryActions'][$index] = $value;
}
return $actionLinks;
'icon' => 'fa-undo',
'accessKey' => '',
'ref' => 'Restore',
+ 'weight' => 90,
],
CRM_Core_Action::DETACH => [
'name' => ts('Move To Case'),
'extra' => 'onclick = "Javascript:fileOnCase( \'move\', %%aid%%, %%caseid%%, this ); return false;"',
'icon' => 'fa-clipboard',
'accessKey' => '',
+ 'weight' => 60,
],
CRM_Core_Action::COPY => [
'name' => ts('Copy To Case'),
'extra' => 'onclick = "Javascript:fileOnCase( \'copy\', %%aid%%, %%caseid%%, this ); return false;"',
'icon' => 'fa-files-o',
'accessKey' => '',
+ 'weight' => 70,
],
];
}
*
* @throws \CRM_Core_Exception
*/
- public function testSortByCaseContact() {
+ public function testSortByCaseContact(): void {
// delete any cases if present
$this->callAPISuccess('Case', 'get', ['api.Case.delete' => ['id' => '$value.id']]);
/**
* Test max_instances
*/
- public function testMaxInstances() {
+ public function testMaxInstances(): void {
$loggedInUser = $this->createLoggedInUser();
$client_id = $this->individualCreate();
$caseObj = $this->createCase($client_id, $loggedInUser);
$case_id = $caseObj->id;
// Sanity check to make sure we'll be testing what we think we're testing.
- $this->assertEquals($caseObj->case_type_id, 1);
+ $this->assertEquals(1, $caseObj->case_type_id);
// Get the case type
$result = $this->callAPISuccess('CaseType', 'get', [
$caseType = array_shift($result['values']);
$activityTypeName = $caseType['definition']['activityTypes'][1]['name'];
// Sanity check to make sure we'll be testing what we think we're testing.
- $this->assertEquals($activityTypeName, "Medical evaluation");
+ $this->assertEquals('Medical evaluation', $activityTypeName);
// Look up the activity type label - we need it later
$result = $this->callAPISuccess('OptionValue', 'get', [