<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.7 |
+ | CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2017 |
+ | Copyright CiviCRM LLC (c) 2004-2020 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2017
+ * @copyright CiviCRM LLC (c) 2004-2020
*/
/**
/**
* Maximum contacts that should be allowed to update
+ * @var int
*/
protected $_maxContacts = 100;
/**
* Maximum profile fields that will be displayed
+ * @var int
*/
protected $_maxFields = 9;
/**
* Variable to store redirect path
+ * @var string
*/
protected $_userContext;
$validate = FALSE;
//validations
if (count($this->_contactIds) > $this->_maxContacts) {
- CRM_Core_Session::setStatus(ts("The maximum number of contacts you can select for Update multiple contacts is %1. You have selected %2. Please select fewer contacts from your search results and try again.", array(
- 1 => $this->_maxContacts,
- 2 => count($this->_contactIds),
- )), ts('Maximum Exceeded'), 'error');
+ CRM_Core_Session::setStatus(ts("The maximum number of contacts you can select for Update multiple contacts is %1. You have selected %2. Please select fewer contacts from your search results and try again.", [
+ 1 => $this->_maxContacts,
+ 2 => count($this->_contactIds),
+ ]), ts('Maximum Exceeded'), 'error');
$validate = TRUE;
}
if (empty($profiles)) {
$types = implode(' ' . ts('or') . ' ', $this->_contactTypes);
- CRM_Core_Session::setStatus(ts("The contact type selected for Update multiple contacts does not have a corresponding profile. Please set up a profile for %1s and try again.", array(1 => $types)), ts('No Profile Available'), 'error');
+ CRM_Core_Session::setStatus(ts("The contact type selected for Update multiple contacts does not have a corresponding profile. Please set up a profile for %1s and try again.", [1 => $types]), ts('No Profile Available'), 'error');
CRM_Utils_System::redirect($this->_userContext);
}
- $ufGroupElement = $this->add('select', 'uf_group_id', ts('Select Profile'), array('' => ts('- select profile -')) + $profiles, TRUE, array('class' => 'crm-select2 huge'));
+ $ufGroupElement = $this->add('select', 'uf_group_id', ts('Select Profile'), ['' => ts('- select profile -')] + $profiles, TRUE, ['class' => 'crm-select2 huge']);
$this->addDefaultButtons(ts('Continue'));
}
* Add local and global form rules.
*/
public function addRules() {
- $this->addFormRule(array('CRM_Contact_Form_Task_PickProfile', 'formRule'));
+ $this->addFormRule(['CRM_Contact_Form_Task_PickProfile', 'formRule']);
}
/**