+--------------------------------------------------------------------+
| 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
*/
/**
* @return array
*/
public function setDefaultValues() {
- $defaults = array();
-
- if ($this->getEntityId()) {
- $params = array('id' => $this->getEntityId());
- $baoName = $this->_BAOName;
- $baoName::retrieve($params, $defaults);
- }
+ $defaults = $this->getEntityDefaults();
if ($this->_action & CRM_Core_Action::ADD) {
$defaults['is_active'] = 1;
);
$this->add('checkbox', 'is_current_member', ts('Current Membership?'));
- $this->add('text', 'weight', ts('Order'),
+ $this->add('number', 'weight', ts('Order'),
CRM_Core_DAO::getAttribute('CRM_Member_DAO_MembershipStatus', 'weight')
);
$this->add('checkbox', 'is_default', ts('Default?'));