Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchKit - Update hook_civicrm_searchKitTasks signature #20467

Merged
merged 1 commit into from Jun 1, 2021

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jun 1, 2021

Overview

Update hook_civicrm_searchKitTasks signature to include checkPermissions and userId.

Before

Hook signature has 1 param.

After

Hook signature has 3 params.

Notes

It's a slightly confusing bit of code due to the dual-purpose nature of the hook - it's used both to gather an array of tasks and to get a full list of Angular modules which provide tasks. That's why this hook needs the base-level array and not just the array of tasks for $this->entity.
Although it may seem wasteful to have extensions add tasks for all possible entities and then the API discards most of it (all but the ones relevant to $this->entity), it's necessary to do it this way so that search_kit_civicrm_angularModules() can gather Angular dependencies.

@civibot
Copy link

civibot bot commented Jun 1, 2021

(Standard links)

@civibot civibot bot added the master label Jun 1, 2021
@colemanw
Copy link
Member Author

colemanw commented Jun 1, 2021

Once this is merged we should also merge https://lab.civicrm.org/documentation/docs/dev/-/merge_requests/914

@eileenmcnaughton
Copy link
Contributor

test this please

@seamuslee001
Copy link
Contributor

This looks fine to me merging

@seamuslee001 seamuslee001 merged commit ee45321 into civicrm:master Jun 1, 2021
@seamuslee001 seamuslee001 deleted the getSearchTasksPermissions branch June 1, 2021 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants