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

Factor out drupal_static for resource display #3965

Merged
merged 5 commits into from May 17, 2023

Conversation

jastraat
Copy link
Contributor

Drupal has had a meta issue to remove all drupal_static calls in core and deprecate the functionality. With that in mind, we're working to move the configuration of the resource download url in the metadata to configuration (that can be edited through the UI) instead of using drupal_static.

This change will need to be reflected in the release notes so that sites who are currently calling &drupal_static('metastore_resource_mapper_display')
know that they will need to update their code.

Included changes:

  • metastore_resource_mapper_display static variable fully removed

  • new configuration setting in metastore.settings called 'resource_perspective_display' with two options: source (default) and local_url

  • retrieveDownloadUrlFromResourceMapper() uses the new config setting to determine how to display the download url

  • The new config setting can be modified on the Resources form.

  • Test coverage exists

  • Documentation exists

QA Steps

@jastraat jastraat requested a review from dafeder May 12, 2023 14:18
Copy link
Member

@dafeder dafeder left a comment

Choose a reason for hiding this comment

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

Looks great. I think at some point it might make sense to consolidate anything "resource" related into the datastore module since the division of resource between datastore and metastore doesn't make a ton of sense IMO, but that's obviously way beyond the scope of this.

@dafeder dafeder merged commit e873e93 into 2.x May 17, 2023
11 checks passed
@janette janette deleted the drupal_static_resource_display branch May 19, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants