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

Standardize format for entityRef create links #13628

Merged
merged 1 commit into from
Feb 17, 2019

Conversation

colemanw
Copy link
Member

Overview

This continues some refactoring done in #13625 and #13491 to make entityRef links easier for developers to work with.

Before

Create links for contacts were given special treatment and were pre-loaded to the clientside. Others had to be loaded at runtime.

After

All links treated the same and pre-loaded to the clientside so that they work equally well with all entities.

Technical Details

This should make the code easier to understand and also will make entityRef widgets easier to add dynamically e.g. with Angular-based pages.

@civibot
Copy link

civibot bot commented Feb 17, 2019

(Standard links)

@civibot civibot bot added the master label Feb 17, 2019
foreach (CRM_Contact_BAO_ContactType::basicTypes() as $contactType) {
$profiles[] = 'new_' . strtolower($contactType);
}
$retrieved = civicrm_api3('uf_group', 'get', [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW - I've taken to using the newer format where you stick ['values'] on the end & then don't need to unpack from values

@eileenmcnaughton
Copy link
Contributor

I've worked through this code & done a couple of UI tests on create contribution using entity Ref & create from shared address & it works for me

@eileenmcnaughton eileenmcnaughton merged commit 2995cd1 into civicrm:master Feb 17, 2019
@eileenmcnaughton eileenmcnaughton deleted the entityRefs2 branch February 17, 2019 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants