return ts('Member Contact Type');
}
+ /**
+ * Set defaults.
+ *
+ * @return array
+ * @throws \Exception
+ */
+ public function setDefaultValues() {
+ $this->_defaults = parent::setDefaultValues();
+ //LCD also allow restrictions to membership owner via GET
+ $owner = CRM_Utils_Request::retrieve('owner', 'String');
+ if (in_array($owner, ['0', '1'])) {
+ $this->_defaults['member_is_primary'] = $owner;
+ }
+ return $this->_defaults;
+ }
+
/**
* The post processing of the form gets done here.
*
$prefix
);
$controller->setEmbedded(TRUE);
-
- $query = &$selector->getQuery();
$controller->run();
}
return;
}
- $status = CRM_Utils_Request::retrieve('status', 'String');
+ // @todo Most of the below is likely no longer required.
+ $status = CRM_Utils_Request::retrieve('membership_status_id', 'String');
if ($status) {
$status = explode(',', $status);
$this->_formValues['membership_status_id'] = $this->_defaults['membership_status_id'] = (array) $status;
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive',
$this
);
-
- //LCD also allow restrictions to membership owner via GET
- $owner = CRM_Utils_Request::retrieve('owner', 'String');
- if (in_array($owner, ['0', '1'])) {
- $this->_formValues['member_is_primary'] = $this->_defaults['member_is_primary'] = $owner;
- }
}
/**