Problem/Motivation
Metatags reach a response two ways. The envelope of a page carries the tags of the request, collected from every service tagged as a provider; the contract those providers implement takes no entity, because there is exactly one page being answered. A fragment is different: a listing of thirty cards renders thirty entities, and the tags of the page they are listed on say nothing about any of them. Today the shape that renders metatags into a fragment can therefore only serve one source - a field of the bundle - and answers with no key for the rest.
Proposed resolution
- An entity-oriented method on the provider contract, so a provider can be asked for the metatags of a given entity rather than of the current request.
- A default that keeps every existing provider working: a provider that cannot answer about an arbitrary entity says so, and the fragment has no metatags key - the same answer as today.
- The metatags shape asks the providers for the sources the conventions role names, once they can be asked.
- A change record, because the contract is marked
@apiand is implemented outside this module.
Remaining tasks
Everything.
Issue fork myrest-3623253
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
sergeydruua commentedComment #6
sergeydruua commented