X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FForm.php;h=e4edfb0a7c60ee50309b0ac043f253279145fa19;hb=3ea6ec7d5a47113bc14b28cd9760bab2e732c801;hp=be00bd95a60198cb55b636792ac0974ba537b239;hpb=e79f71cd891df496f918e1d95963b0e19a0ea775;p=civicrm-core.git diff --git a/CRM/Admin/Form.php b/CRM/Admin/Form.php index be00bd95a6..e4edfb0a7c 100644 --- a/CRM/Admin/Form.php +++ b/CRM/Admin/Form.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2018 | + | Copyright CiviCRM LLC (c) 2004-2019 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2018 + * @copyright CiviCRM LLC (c) 2004-2019 */ /** @@ -73,9 +73,9 @@ class CRM_Admin_Form extends CRM_Core_Form { $this->_id = $this->get('id'); $this->_BAOName = $this->get('BAOName'); - $this->_values = array(); + $this->_values = []; if (isset($this->_id)) { - $params = array('id' => $this->_id); + $params = ['id' => $this->_id]; // this is needed if the form is outside the CRM name space $baoName = $this->_BAOName; $baoName::retrieve($params, $this->_values); @@ -92,8 +92,8 @@ class CRM_Admin_Form extends CRM_Core_Form { public function setDefaultValues() { // Fetch defaults from the db if (!empty($this->_id) && empty($this->_values) && CRM_Utils_Rule::positiveInteger($this->_id)) { - $this->_values = array(); - $params = array('id' => $this->_id); + $this->_values = []; + $params = ['id' => $this->_id]; $baoName = $this->_BAOName; $baoName::retrieve($params, $this->_values); } @@ -127,28 +127,26 @@ class CRM_Admin_Form extends CRM_Core_Form { */ public function buildQuickForm() { if ($this->_action & CRM_Core_Action::VIEW || $this->_action & CRM_Core_Action::PREVIEW) { - $this->addButtons(array( - array( - 'type' => 'cancel', - 'name' => ts('Done'), - 'isDefault' => TRUE, - ), - ) - ); + $this->addButtons([ + [ + 'type' => 'cancel', + 'name' => ts('Done'), + 'isDefault' => TRUE, + ], + ]); } else { - $this->addButtons(array( - array( - 'type' => 'next', - 'name' => $this->_action & CRM_Core_Action::DELETE ? ts('Delete') : ts('Save'), - 'isDefault' => TRUE, - ), - array( - 'type' => 'cancel', - 'name' => ts('Cancel'), - ), - ) - ); + $this->addButtons([ + [ + 'type' => 'next', + 'name' => $this->_action & CRM_Core_Action::DELETE ? ts('Delete') : ts('Save'), + 'isDefault' => TRUE, + ], + [ + 'type' => 'cancel', + 'name' => ts('Cancel'), + ], + ]); } }