Allow custom code to provide a configuration form for layouts

Created on 27 March 2019, almost 6 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

Some layout plugins choose to provide configuration forms.
Those are form_alter-able by custom code.

However, if a layout plugin does not provide its own form, custom code can't do anything about it without swapping out the plugin class itself.

Proposed resolution

This is what PluginWithFormsInterface is for!

Add that to LayoutDefault (the 99.9% use case) and it will allow custom code to alter the layout definition to provide a form for them, without messing with their plugin class.

Remaining tasks

Write tests

User interface changes

API changes

None. LayoutInterface is not changed here (ideally we'd be able to, but erring on the side of no API addition)

Data model changes

Release notes snippet

Feature request
Status

Needs work

Version

10.1

Component
Layout builder 

Last updated 3 days ago

Created by

🇺🇸United States tim.plunkett Philadelphia

Live updates comments and jobs are added and updated live.
  • Blocks-Layouts

    Blocks and Layouts Initiative. See the #2811175 Add layouts to Drupal issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    The MR doesn't apply for 11.x or 10.3.x so I did a re-roll. Uploading as a patch since I'm not sure if we want to create a new MR for this or if we change the existing MR to target 11.x

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Re-rolled again by removing some tests that conflicted with upstream changes.

Production build 0.71.5 2024