Updated: Comment #N
Problem/Motivation
Originally, the method to get the property values of a ConfigEntity was called getProperties(), and lived on the storage controller.
In #1849480: Allow ConfigEntity classes to control how they are saved it was moved to the entity class itself, but also renamed to getExportProperties().
But yet this is not just useful for export. It can be used whenever the array-based representation of an entity is needed, like in entity normalization.
#2002138: Use an adapter for supporting typed data on ContentEntities also is renaming ContentEntityInterface::getPropertyValues() to toArray() as well, and this can eventually be moved to EntityInterface itself.
Proposed resolution
Rename getExportProperties() to toArray()
Remaining tasks
If #2002138: Use an adapter for supporting typed data on ContentEntities lands before this, also move the method up to EntityInterface
User interface changes
N/A
API changes
ConfigEntityInterface::getExportProperties() is renamed to toArray()
Comment | File | Size | Author |
---|---|---|---|
#7 | config-toarray-2219925-7.patch | 19.06 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettComment #2
socketwench CreditAttribution: socketwench commentedYes, please! toArray() makes a lot more intuitive sense than getExportProperties(). The former is similar to common class methods like toString() and a familiar pattern in other OOP languages.
Comment #3
msonnabaum CreditAttribution: msonnabaum commentedLooks great. Much clearer.
Comment #5
tim.plunkettgit apply --3way took care of it.
Comment #6
webchickSorry, this no longer applies. I can get it in right after a re-roll tho.
Comment #7
tim.plunkettThe class just was moved in #2221929: ConfigNormalizerTest.php is misnamed, easy reroll.
Comment #8
tim.plunkettSending back to rtbc
Comment #9
webchickThere we go!
Committed and pushed to 8.x. Thanks!
Comment #11
tim.plunkettThanks!