return 'UFGroup';
}
- /**
- * The form id saved to the session for an update.
- *
- * @var int
- */
- protected $_id;
-
/**
* The title for group.
*
// views are implemented as frozen form
if ($this->_action & CRM_Core_Action::VIEW) {
$this->freeze();
- $this->addElement('button', 'done', ts('Done'), ['onclick' => "location.href='civicrm/admin/uf/group?reset=1&action=browse'"]);
+ $this->addElement('xbutton', 'done', ts('Done'), [
+ 'type' => 'button',
+ 'onclick' => "location.href='civicrm/admin/uf/group?reset=1&action=browse'",
+ ]);
}
$this->addFormRule(['CRM_UF_Form_Group', 'formRule'], $this);
$params = ['id' => $this->_id];
CRM_Core_BAO_UFGroup::retrieve($params, $defaults);
- $defaults['group'] = CRM_Utils_Array::value('limit_listings_group_id', $defaults);
- $defaults['add_contact_to_group'] = CRM_Utils_Array::value('add_to_group_id', $defaults);
+ $defaults['group'] = $defaults['limit_listings_group_id'] ?? NULL;
+ $defaults['add_contact_to_group'] = $defaults['add_to_group_id'] ?? NULL;
//get the uf join records for current uf group
$ufJoinRecords = CRM_Core_BAO_UFGroup::getUFJoinRecord($this->_id);
foreach ($ufJoinRecords as $key => $value) {
$checked[$value] = 1;
}
- $defaults['uf_group_type'] = isset($checked) ? $checked : "";
+ $defaults['uf_group_type'] = $checked ?? "";
$showAdvanced = 0;
$advFields = [