X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FPledge%2FForm%2FPledgeView.php;h=a8644f3bf62234f11df774ad204a28b9bbfb0f8a;hb=f299f7db79fed6f3598c84302966bda087e7cac3;hp=ce6c9146f3d19a485751e2b6136b082aa700841f;hpb=58d4a38f6dbe9137ab5a4fe8333e1304ae6228a3;p=civicrm-core.git diff --git a/CRM/Pledge/Form/PledgeView.php b/CRM/Pledge/Form/PledgeView.php index ce6c9146f3..a8644f3bf6 100644 --- a/CRM/Pledge/Form/PledgeView.php +++ b/CRM/Pledge/Form/PledgeView.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2018 | + | Copyright CiviCRM LLC (c) 2004-2020 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2018 + * @copyright CiviCRM LLC (c) 2004-2020 */ /** @@ -41,14 +41,14 @@ class CRM_Pledge_Form_PledgeView extends CRM_Core_Form { */ public function preProcess() { - $values = $ids = array(); - $params = array('id' => $this->get('id')); + $values = $ids = []; + $params = ['id' => $this->get('id')]; CRM_Pledge_BAO_Pledge::getValues($params, $values, $ids ); - $values['frequencyUnit'] = ts('%1(s)', array(1 => $values['frequency_unit'])); + $values['frequencyUnit'] = ts('%1(s)', [1 => $values['frequency_unit']]); if (isset($values["honor_contact_id"]) && $values["honor_contact_id"]) { $sql = "SELECT display_name FROM civicrm_contact WHERE id = " . $values["honor_contact_id"]; @@ -80,7 +80,7 @@ class CRM_Pledge_Form_PledgeView extends CRM_Core_Form { "action=view&reset=1&id={$values['id']}&cid={$values['contact_id']}&context=home" ); - $recentOther = array(); + $recentOther = []; if (CRM_Core_Permission::checkActionPermission('CiviPledge', CRM_Core_Action::UPDATE)) { $recentOther['editUrl'] = CRM_Utils_System::url('civicrm/contact/view/pledge', "action=update&reset=1&id={$values['id']}&cid={$values['contact_id']}&context=home" @@ -129,15 +129,14 @@ class CRM_Pledge_Form_PledgeView extends CRM_Core_Form { * Build the form object. */ public function buildQuickForm() { - $this->addButtons(array( - array( + $this->addButtons([ + [ 'type' => 'next', 'name' => ts('Done'), 'spacing' => '         ', 'isDefault' => TRUE, - ), - ) - ); + ], + ]); } }