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

Add function filterLinks to return an array of links for an entity that can be used by the API / form layer to generate a link #14112

Merged
merged 1 commit into from
Apr 25, 2019

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Apr 22, 2019

Overview

Add function filterLinks to return an array of links for an entity that can be used by the API / form layer to generate a link

Before

Link html is generated server-side using CRM_Core_Action::formLink()

After

Link html can be generated client-side using CRM_Core_Action::filterLinks()

Technical Details

A new function that parses the same data structures as CRM_Core_Action::formLink()

Comments

This is currently unused but I want to use it for the case activity links refactor and it could be used in various other places too. https://github.com/mattwire/civicrm-core/tree/case_links_refactor_part2

It will also help with replacing the current form layer as we are not relying on server-side hardcoded html and can instead choose how to present the links (eg. via API or client-side).

…at can be used by the API / form layer to generate a link
@civibot
Copy link

civibot bot commented Apr 22, 2019

(Standard links)

@civibot civibot bot added the master label Apr 22, 2019
@eileenmcnaughton
Copy link
Contributor

I'm not a fan of adding a function without setting at least one place in the code to use it at the same time. However, I realise this is something you've already thought through & broken out into a PR for simplification so I'm going to proceed to merge this one

1 similar comment
@eileenmcnaughton
Copy link
Contributor

I'm not a fan of adding a function without setting at least one place in the code to use it at the same time. However, I realise this is something you've already thought through & broken out into a PR for simplification so I'm going to proceed to merge this one

@eileenmcnaughton eileenmcnaughton merged commit 64eaa69 into civicrm:master Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants