Compatibility with layout_library module

Created on 19 July 2024, 9 months ago

Problem/Motivation

Right now , this module and Layout Library β†’ are incompatible, as Layout Library layouts are "entity-less", and this causes this code to fail since $layout_entity is NULL

    $layout_entity = $this->sectionStorage->getContextValue('entity');

    $entity_values = [
      'label' => $form_state->getValue('label'),
      'layout_section' => $deep_cloned_sections,
      'type' => 'template',
      'entity_type' => $layout_entity->getEntityTypeId(),
      'entity_id' => $layout_entity->id(),
    ];

I have done a quick search for the usages of the entity_id and entity_type fields and seems they are not very used. This leads me to think that maybe with a few alterations this module could support the Layout Library module. Entity Type can be read from the layout library config, while the ID might be not necessarily required.

Steps to reproduce

- Try to export a Section from within a Layout Library context
- Fail!

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain idiaz.roncero Madrid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024