For efficient dealing with multiple values it's often useful to deal with property item values not item-wise, but per column/value. I.e. it would be handy to have getters on the EntityProperty level that allow you to get the values per column/value:

E.g. this would be handy when handling multiple-entity-references:

$entity->tags->getValues('entity')

Thus, it would be useful everywhere where you need to process all values of a certain value/column at once for performance.

Thoughts?

Comments

Berdir’s picture

Yes, sounds useful, typical use case is getting all term id's out of a term reference field, right now you need to loop over it.