+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Contact_Form_Search_Custom_PostalMailing extends CRM_Contact_Form_Search_Custom_Base implements CRM_Contact_Form_Search_Interface {
protected $_aclFrom = NULL;
protected $_aclWhere = NULL;
+
/**
* Class constructor.
*
public function __construct(&$formValues) {
parent::__construct($formValues);
- $this->_columns = array(
+ $this->_columns = [
// If possible, don't use aliases for the columns you select.
// You can prefix columns with table aliases, if needed.
//
// If you don't do this, the patch of CRM-16587 might cause database
// errors.
ts('State') => 'state_province.name',
- );
+ ];
}
/**
* @param CRM_Core_Form $form
*/
public function buildForm(&$form) {
- $groups = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::nestedGroup(FALSE);
- $form->addElement('select', 'group_id', ts('Group'), $groups, array('class' => 'crm-select2 huge'));
+ $groups = ['' => ts('- select group -')] + CRM_Core_PseudoConstant::nestedGroup(FALSE);
+ $form->addElement('select', 'group_id', ts('Group'), $groups, ['class' => 'crm-select2 huge']);
/**
* if you are using the standard template, this array tells the template what elements
* are part of the search criteria
*/
- $form->assign('elements', array('group_id'));
+ $form->assign('elements', ['group_id']);
}
/**
* @return string
*/
public function where($includeContactIDs = FALSE) {
- $params = array();
+ $params = [];
$count = 1;
- $clause = array();
+ $clause = [];
$groupID = CRM_Utils_Array::value('group_id',
$this->_formValues
);
if ($groupID) {
- $params[$count] = array($groupID, 'Integer');
+ $params[$count] = [$groupID, 'Integer'];
$clause[] = "cgc.group_id = %{$count}";
}