Create an interface for ConfigEntityMapper

Created on 20 January 2016, almost 9 years ago
Updated 22 July 2023, over 1 year ago

Follow-up to #2649752: Add categorization to config translation mappers

Problem/Motivation

ConfigEntityMapper provides additional methods on top of ConfigNamesMapper that do not have an interface.

The interface and its methods are needed for use-cases where we need to dynamically enhance mappers (once #2577761: We need a way to dynamically alter the list of config names for config mappers is in), for example 🐛 Entity view/form mode formatter/widget settings have no translation UI Needs review .

Proposed resolution

Create interface for ConfigEntityMapper so we can code against contracts.

Remaining tasks

Commit.

User interface changes

None.

API changes

API addition. No breaks for classes extending ConfigEntityMapper (or not doing so). The following interface is added:

interface ConfigEntityMapperInterface {
public function getEntity();
public function setEntity(ConfigEntityInterface $entity);
public function setType($entity_type);
public function getType();
}

Data model changes

None.

📌 Task
Status

Fixed

Version

11.0 🔥

Component
Config translation 

Last updated about 2 hours ago

Created by

🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

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.

Production build 0.71.5 2024