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

[REF] CoreResources - Simplify disabled component check #22506

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

colemanw
Copy link
Member

Overview

Code simplification for checking enabled components when fetching entity ref links/filters.

Before

More complex

After

Simpler

Technical Details

Now that component DAOs have a COMPONENT defined, checks like this are much easier.

Now that component DAOs have a COMPONENT defined, checks like this are much easier.
@civibot
Copy link

civibot bot commented Jan 14, 2022

(Standard links)

@civibot civibot bot added the master label Jan 14, 2022
@totten
Copy link
Member

totten commented Jan 14, 2022

Code change looks appropriate.

The output of the function appears in crm-l10n.*.js (specifically exporting data to CRM.config.entityRef), so I did some light r-run as follows:

  • Login to a demo site.
  • Inspect CRM.config.entityRef in default config. Observe that Case is present.
  • Disable the CiviCase component. Reinspect CRM.config.entityRef. Observe that Case is missing.
  • Enable the CiviCase component. Reinspect CRM.config.entityRef. Observe that Case is restored.

There is some very light coverage via CRM_Core_Resources test.

@totten totten merged commit fd2e332 into civicrm:master Jan 14, 2022
@totten totten deleted the cleanupRes branch January 14, 2022 19:58
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