Page MenuHomePhabricator

Alter EntityUrlLookup interface to allow for context relevant URL
Closed, ResolvedPublic

Description

EntityUrlLookup currently only has 1 method, getFullUrl as that is all we have needed so far.
Moving forward we also need to be able to get a relative / local url for an entity ID.

We decided that the best way to approach this would be to continue to have a FULL method, but also have a more generic getUrl method that would return a local or full url based on the context.

These behaviours should be documented in the phpdoc of the interface.

This will be used in T251242 where the formatter needs both / either relative / full url (for either federated props or local props)

Event Timeline

Addshore updated the task description. (Show Details)May 4 2020, 10:13 AM
Restricted Application added a project: User-Addshore. · View Herald TranscriptMay 4 2020, 3:22 PM

Change 594225 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Alter EntityUrlLookup to allow for context relevant URLs

https://gerrit.wikimedia.org/r/594225

Change 594225 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Alter EntityUrlLookup to allow for context relevant URLs

https://gerrit.wikimedia.org/r/594225

Samantha_Alipio_WMDE closed this task as Resolved.May 25 2020, 10:29 AM