financialacls.php
Table of Contents
Functions
- financialacls_civicrm_config() : mixed
- Implements hook_civicrm_config().
- financialacls_civicrm_container() : mixed
- financialacls_civicrm_install() : mixed
- Implements hook_civicrm_install().
- financialacls_civicrm_enable() : mixed
- Implements hook_civicrm_enable().
- financialacls_civicrm_pre() : mixed
- Intervene to prevent deletion, where permissions block it.
- financialacls_civicrm_selectWhereClause() : mixed
- Implements hook_civicrm_selectWhereClause().
- _financialacls_civicrm_get_accounts_clause() : string
- Get the clause to limit available types.
- _financialacls_civicrm_get_type_clause() : string
- Get the clause to limit available types.
- _financialacls_civicrm_get_accessible_financial_types() : array<string|int, int>
- Get an array of the ids of accessible financial types.
- _financialacls_civicrm_get_inaccessible_financial_types() : array<string|int, int>
- Get an array of the ids of accessible financial types.
- _financialacls_civicrm_get_membership_type_clause() : string
- Get the clause to limit available membership types.
- financialacls_civicrm_buildAmount() : mixed
- Remove unpermitted options.
- financialacls_civicrm_membershipTypeValues() : mixed
- Remove unpermitted membership types from selection availability.
- financialacls_civicrm_permission() : mixed
- Add permissions.
- _financialacls_civi_api4_authorizeContribution() : mixed
- Listener for 'civi.api4.authorizeRecord::Contribution'
- _civicrm_financial_acls_check_permissioned_line_items() : bool
- Function to check if lineitems present in a contribution have permissioned FTs.
- _financialacls_getRequiredPermission() : string
- Get the permission required to perform this action on this financial type.
- financialacls_civicrm_fieldOptions() : mixed
- Remove unpermitted financial types from field Options in search context.
- financialacls_is_acl_limiting_enabled() : bool
- Is financial acl limiting enabled.
- financialacls_toggle() : mixed
- Clear the statics cache when the setting is enabled or disabled.
- financialacls_civicrm_alterMenu() : void
- Require financial acl permissions for financial screens.
- financialacls_civicrm_preProcess() : void
- financialacls_civicrm_links() : mixed
- Hide edit/enable/disable links for memberships of a given Financial Type Note: The $objectID param can be an int, string or null, hence not typed
Functions
financialacls_civicrm_config()
Implements hook_civicrm_config().
financialacls_civicrm_config(mixed &$config) : mixed
Parameters
- $config : mixed
Tags
financialacls_civicrm_container()
financialacls_civicrm_container(ContainerBuilder $container) : mixed
Parameters
- $container : ContainerBuilder
financialacls_civicrm_install()
Implements hook_civicrm_install().
financialacls_civicrm_install() : mixed
Tags
financialacls_civicrm_enable()
Implements hook_civicrm_enable().
financialacls_civicrm_enable() : mixed
Tags
financialacls_civicrm_pre()
Intervene to prevent deletion, where permissions block it.
financialacls_civicrm_pre(string $op, string $objectName, int|null $id, array<string|int, mixed> &$params) : mixed
Parameters
- $op : string
- $objectName : string
- $id : int|null
- $params : array<string|int, mixed>
Tags
financialacls_civicrm_selectWhereClause()
Implements hook_civicrm_selectWhereClause().
financialacls_civicrm_selectWhereClause(mixed $entity, mixed &$clauses) : mixed
Parameters
- $entity : mixed
- $clauses : mixed
Tags
_financialacls_civicrm_get_accounts_clause()
Get the clause to limit available types.
_financialacls_civicrm_get_accounts_clause() : string
Return values
string_financialacls_civicrm_get_type_clause()
Get the clause to limit available types.
_financialacls_civicrm_get_type_clause() : string
Return values
string_financialacls_civicrm_get_accessible_financial_types()
Get an array of the ids of accessible financial types.
_financialacls_civicrm_get_accessible_financial_types() : array<string|int, int>
If none then it will be [0]
Return values
array<string|int, int>_financialacls_civicrm_get_inaccessible_financial_types()
Get an array of the ids of accessible financial types.
_financialacls_civicrm_get_inaccessible_financial_types() : array<string|int, int>
If none then it will be [0]
Return values
array<string|int, int>_financialacls_civicrm_get_membership_type_clause()
Get the clause to limit available membership types.
_financialacls_civicrm_get_membership_type_clause() : string
Tags
Return values
stringfinancialacls_civicrm_buildAmount()
Remove unpermitted options.
financialacls_civicrm_buildAmount(string $component, CRM_Core_Form $form, array<string|int, mixed> &$feeBlock) : mixed
Parameters
- $component : string
- $form : CRM_Core_Form
- $feeBlock : array<string|int, mixed>
Tags
financialacls_civicrm_membershipTypeValues()
Remove unpermitted membership types from selection availability.
financialacls_civicrm_membershipTypeValues(CRM_Core_Form $form, array<string|int, mixed> &$membershipTypeValues) : mixed
.
Parameters
- $form : CRM_Core_Form
- $membershipTypeValues : array<string|int, mixed>
Tags
financialacls_civicrm_permission()
Add permissions.
financialacls_civicrm_permission(array<string|int, mixed> &$permissions) : mixed
Parameters
- $permissions : array<string|int, mixed>
Tags
_financialacls_civi_api4_authorizeContribution()
Listener for 'civi.api4.authorizeRecord::Contribution'
_financialacls_civi_api4_authorizeContribution(AuthorizeRecordEvent $e) : mixed
Parameters
- $e : AuthorizeRecordEvent
Tags
_civicrm_financial_acls_check_permissioned_line_items()
Function to check if lineitems present in a contribution have permissioned FTs.
_civicrm_financial_acls_check_permissioned_line_items(int $id, string $op[, bool $force = TRUE ][, int $contactID = NULL ]) : bool
Parameters
- $id : int
-
contribution id
- $op : string
-
the mode of operation, can be add, view, edit, delete
- $force : bool = TRUE
- $contactID : int = NULL
Return values
bool_financialacls_getRequiredPermission()
Get the permission required to perform this action on this financial type.
_financialacls_getRequiredPermission(int $financialTypeID, string $action) : string
Parameters
- $financialTypeID : int
- $action : string
Return values
stringfinancialacls_civicrm_fieldOptions()
Remove unpermitted financial types from field Options in search context.
financialacls_civicrm_fieldOptions(string $entity, string $field, array<string|int, mixed> &$options, array<string|int, mixed> $params) : mixed
Search context is described as 'search' => "search: searchable options are returned; labels are translated.", So this is appropriate to removing the options from search screens.
Parameters
- $entity : string
- $field : string
- $options : array<string|int, mixed>
- $params : array<string|int, mixed>
Tags
financialacls_is_acl_limiting_enabled()
Is financial acl limiting enabled.
financialacls_is_acl_limiting_enabled() : bool
Once this extension is detangled enough to be optional this will go and the status of the extension rather than the setting will dictate.
Return values
boolfinancialacls_toggle()
Clear the statics cache when the setting is enabled or disabled.
financialacls_toggle() : mixed
Note the setting will eventually disappear in favour of whether the extension is enabled or disabled.
financialacls_civicrm_alterMenu()
Require financial acl permissions for financial screens.
financialacls_civicrm_alterMenu(array<string|int, mixed> &$menu) : void
Parameters
- $menu : array<string|int, mixed>
financialacls_civicrm_preProcess()
financialacls_civicrm_preProcess(string $formName, CRM_Event_Form_Registration|CRM_Contribute_Form_Contribution $form) : void
Parameters
- $formName : string
- $form : CRM_Event_Form_Registration|CRM_Contribute_Form_Contribution
financialacls_civicrm_links()
Hide edit/enable/disable links for memberships of a given Financial Type Note: The $objectID param can be an int, string or null, hence not typed
financialacls_civicrm_links(string $op, string|null $objectName, mixed $objectID, array<string|int, mixed> &$links, int|null &$mask, array<string|int, mixed> &$values) : mixed
Implements hook_civicrm_links()
Parameters
- $op : string
- $objectName : string|null
- $objectID : mixed
- $links : array<string|int, mixed>
- $mask : int|null
- $values : array<string|int, mixed>