X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FTask%2FRemoveFromGroup.php;h=d803f436e7b6d8d15147e9b9c1abf1bc30f4ec69;hb=69078420f066e5d038b91372e9a19eb77073121b;hp=ba8cc9f111fcecaaccacee173cbd3fa7d9e516d1;hpb=d96bf18d5b1849cc8f21c8845706eaccc78db5f3;p=civicrm-core.git diff --git a/CRM/Contact/Form/Task/RemoveFromGroup.php b/CRM/Contact/Form/Task/RemoveFromGroup.php index ba8cc9f111..d803f436e7 100644 --- a/CRM/Contact/Form/Task/RemoveFromGroup.php +++ b/CRM/Contact/Form/Task/RemoveFromGroup.php @@ -43,8 +43,8 @@ class CRM_Contact_Form_Task_RemoveFromGroup extends CRM_Contact_Form_Task { */ public function buildQuickForm() { // add select for groups - $group = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::nestedGroup(); - $groupElement = $this->add('select', 'group_id', ts('Select Group'), $group, TRUE, array('class' => 'crm-select2 huge')); + $group = ['' => ts('- select group -')] + CRM_Core_PseudoConstant::nestedGroup(); + $groupElement = $this->add('select', 'group_id', ts('Select Group'), $group, TRUE, ['class' => 'crm-select2 huge']); CRM_Utils_System::setTitle(ts('Remove Contacts from Group')); $this->addDefaultButtons(ts('Remove from Group')); @@ -58,7 +58,7 @@ class CRM_Contact_Form_Task_RemoveFromGroup extends CRM_Contact_Form_Task { * the default array reference */ public function setDefaultValues() { - $defaults = array(); + $defaults = []; if ($this->get('context') === 'smog') { $defaults['group_id'] = $this->get('gid'); @@ -75,24 +75,24 @@ class CRM_Contact_Form_Task_RemoveFromGroup extends CRM_Contact_Form_Task { list($total, $removed, $notRemoved) = CRM_Contact_BAO_GroupContact::removeContactsFromGroup($this->_contactIds, $groupId); - $status = array( - ts("%count contact removed from '%2'", array( + $status = [ + ts("%count contact removed from '%2'", [ 'count' => $removed, 'plural' => "%count contacts removed from '%2'", 2 => $group[$groupId], - )), - ); + ]), + ]; if ($notRemoved) { - $status[] = ts('1 contact was already not in this group', array( - 'count' => $notRemoved, - 'plural' => '%count contacts were already not in this group', - )); + $status[] = ts('1 contact was already not in this group', [ + 'count' => $notRemoved, + 'plural' => '%count contacts were already not in this group', + ]); } $status = ''; - CRM_Core_Session::setStatus($status, ts("Removed Contact From Group", array( - 'plural' => "Removed Contacts From Group", - 'count' => $removed, - )), 'success', array('expires' => 0)); + CRM_Core_Session::setStatus($status, ts("Removed Contact From Group", [ + 'plural' => "Removed Contacts From Group", + 'count' => $removed, + ]), 'success', ['expires' => 0]); } }