MembershipType.php
This api exposes CiviCRM membership type.
Table of Contents
Functions
- civicrm_api3_membership_type_create() : array<string|int, mixed>
- API to Create or update a Membership Type.
- _civicrm_api3_membership_type_create_spec() : mixed
- Adjust Metadata for Create action.
- civicrm_api3_membership_type_get() : array<string|int, mixed>
- Get a Membership Type.
- _civicrm_api3_membership_type_get_spec() : mixed
- Adjust Metadata for Get action.
- _civicrm_api3_membership_type_getlist_params() : mixed
- Adjust input for getlist action.
- civicrm_api3_membership_type_delete() : array<string|int, mixed>
- Deletes an existing membership type.
Functions
civicrm_api3_membership_type_create()
API to Create or update a Membership Type.
civicrm_api3_membership_type_create(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
-
Array of name/value property values of civicrm_membership_type.
Return values
array<string|int, mixed> —API result array.
_civicrm_api3_membership_type_create_spec()
Adjust Metadata for Create action.
_civicrm_api3_membership_type_create_spec(array<string|int, mixed> &$params) : mixed
The metadata is used for setting defaults, documentation & validation.
Parameters
- $params : array<string|int, mixed>
-
Array of parameters determined by getfields.
civicrm_api3_membership_type_get()
Get a Membership Type.
civicrm_api3_membership_type_get(array<string|int, mixed> $params) : array<string|int, mixed>
This api is used for finding an existing membership type.
Parameters
- $params : array<string|int, mixed>
-
Array of name/value property values of civicrm_membership_type.
Return values
array<string|int, mixed> —API result array.
_civicrm_api3_membership_type_get_spec()
Adjust Metadata for Get action.
_civicrm_api3_membership_type_get_spec(array<string|int, mixed> &$params) : mixed
The metadata is used for setting defaults, documentation & validation.
Parameters
- $params : array<string|int, mixed>
-
Array of parameters determined by getfields.
_civicrm_api3_membership_type_getlist_params()
Adjust input for getlist action.
_civicrm_api3_membership_type_getlist_params(array<string|int, mixed> &$request) : mixed
We want to only return active membership types for getlist. It's a bit arguable whether this should be applied at the 'get' level but, since it's hard to unset we'll just do it here.
The usage of getlist is entity-reference fields & the like so using only active ones makes sense.
Parameters
- $request : array<string|int, mixed>
-
Array of parameters determined by getfields.
civicrm_api3_membership_type_delete()
Deletes an existing membership type.
civicrm_api3_membership_type_delete(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
Return values
array<string|int, mixed> —API result array.