Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300351

Simplify ContentEntityBase internal field storage by removing special treatment for LANGCODE_DEFAULT

$
0
0

In #2076445-69: Make sure language codes for original field values always match entity language regardless of field translatability @yched said:

I'm not sure I see the value in keeping the internal runtime storage keyed by LANGCODE_DEFAULT (in $this->translations, $this->fields[$field_name], $this->values[$field_name]), rather than the actual langcode. It complicates the code and logic in a lot of places in ContentEntityBase ?

To which @fago replied:

I think we should start arranging data according to our translation model, i.e. entity - language - fields. I agree the keying by default language stuff seems deprecated since the object now deals with all translations, instead we could start doing shortcuts as $this->current_fields =& $this->fields[$this->activeLangcode];. But that all does not have to happen in this issue as it's internal restructuring, so let's do as it's easier?


Viewing all articles
Browse latest Browse all 300351

Latest Images

Trending Articles