Problem/Motivation

Every front end starts by fetching one bundle of site-wide data: menus, phone numbers, social links, schedules, counters. What goes into it is per site, which is why it is a convention rather than a fixed list, and why the current implementation is a long hand-written method that no other site can use.

Proposed resolution

  • MyrestStaticDataResourceBase assembling the blocks named by the static_data convention, each block a small plugin or a service call.
  • Menus rendered through a shared builder with depth and access handling, since the same output is needed inside other responses.
  • A block whose convention is unfilled is absent from the response — no empty key.
  • Cache tags per menu, per configuration object and per referenced entity, so that editing a phone number invalidates this response and nothing else.

Remaining tasks

Everything.

Issue fork myrest-3621322

Command icon 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

sergeydruua created an issue. See original summary.

  • sergeydruua committed f251954b on 1.0.x
    Issue #3621322: Add the static data resource base class
    
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)