getValue() on Map TypedData could use some additional comments

Created on 12 April 2017, about 7 years ago
Updated 14 February 2023, over 1 year ago

The only documentation on getValue() on https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21TypedData... is that it "Gets the data value."

While technically I guess its accurate, the implementation here adds logic that could do with an explanation. For example, it introduces logic to ignore Computed properties. Why? It would be helpful to put some of that here so people who stumble across have an idea of what's going on.

We ran into a problem recently with a custom field type and the interaction with Inline Entity Form.

It just seems that Computed properties are part of the "value" of a FieldItem, and some documentation would have helped us make a decision about which direction to go.

πŸ“Œ Task
Status

Needs work

Version

10.1 ✨

Component
Typed dataΒ  β†’

Last updated 18 days ago

  • Maintained by
  • πŸ‡¦πŸ‡ΉAustria @fago
Created by

πŸ‡ΊπŸ‡ΈUnited States jazzdrive3 Louisville, KY

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

    Primarily changes documentation, not code. For Drupal core issues, select the Documentation component instead of using this tag. In general, component selection is preferred over tag selection.

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.

  • Status changed to Needs work over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    YES! When I was starting in Drupal knowing this would of been nice.

    I agree with both you that FieldItemListInterface seems like a good place though.

Production build 0.69.0 2024