X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FPager.php;h=390764d766ac0c20a114b5c932b0a9f3aed6cf4f;hb=73e57781380c5e928082d48d3a7e61ed1f339f78;hp=1c31396acf149647eebaf078ca732ef0f4b8c961;hpb=7a88e045914e81a53e30af54aee578baa9ff0220;p=civicrm-core.git
diff --git a/CRM/Utils/Pager.php b/CRM/Utils/Pager.php
index 1c31396acf..390764d766 100644
--- a/CRM/Utils/Pager.php
+++ b/CRM/Utils/Pager.php
@@ -88,11 +88,11 @@ class CRM_Utils_Pager extends Pager_Sliding {
$statusMessage = '';
}
else {
- $statusMessage = ts('%1 - %2 of %3', array(1 => $start, 2 => $end, 3 => $params['total']));
+ $statusMessage = ts('%1 - %2 of %3', [1 => $start, 2 => $end, 3 => $params['total']]);
}
$params['status'] = str_replace('%%StatusMessage%%', $statusMessage, $params['status']);
- $this->_response = array(
+ $this->_response = [
'first' => $this->getFirstPageLink(),
'back' => $this->getBackPageLink(),
'next' => $this->getNextPageLink(),
@@ -104,21 +104,21 @@ class CRM_Utils_Pager extends Pager_Sliding {
'buttonTop' => CRM_Utils_Array::value('buttonTop', $params),
'buttonBottom' => CRM_Utils_Array::value('buttonBottom', $params),
'currentLocation' => $this->getCurrentLocation(),
- );
+ ];
/**
* A page cannot have two variables with the same form name. Hence in the
* pager display, we have a form submission at the top with the normal
* page variable, but a different form element for one at the bottom.
*/
- $this->_response['titleTop'] = ts('Page %1 of %2', array(
- 1 => '',
- 2 => $this->_response['numPages'],
- ));
- $this->_response['titleBottom'] = ts('Page %1 of %2', array(
- 1 => '',
- 2 => $this->_response['numPages'],
- ));
+ $this->_response['titleTop'] = ts('Page %1 of %2', [
+ 1 => '',
+ 2 => $this->_response['numPages'],
+ ]);
+ $this->_response['titleBottom'] = ts('Page %1 of %2', [
+ 1 => '',
+ 2 => $this->_response['numPages'],
+ ]);
}
/**
@@ -148,8 +148,8 @@ class CRM_Utils_Pager extends Pager_Sliding {
$params['separator'] = '';
$params['spacesBeforeSeparator'] = 1;
$params['spacesAfterSeparator'] = 1;
- $params['extraVars'] = array('force' => 1);
- $params['excludeVars'] = array('reset', 'snippet', 'section');
+ $params['extraVars'] = ['force' => 1];
+ $params['excludeVars'] = ['reset', 'snippet', 'section'];
// set previous and next text labels
$params['prevImg'] = ' ' . ts('< Previous');
@@ -248,7 +248,7 @@ class CRM_Utils_Pager extends Pager_Sliding {
$offset = ($pageId - 1) * $this->_perPage;
- return array($offset, $this->_perPage);
+ return [$offset, $this->_perPage];
}
/**