Feature #9244
Add support for subproperty and __toString() in GroupedForViewHelper
Status: | Resolved | Start date: | 2010-08-11 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Jochen Rau | % Done: | 100% |
|
Category: | ViewHelpers | |||
Target version: | - | |||
Has patch: | Yes |
Description
Problem 1:
I have an array of objects and I want to group them by a property being a ValueObject. The VH should ensure __toString() is called on $currentGroupKey if it's an object.
Problem 2:
I have an array of objects and I want to group them by a property of a property. Let's say we have persons that are linked to a company, I want to group them by company.name:
<f:groupedFor each="{persons}" as="personsOfCompany" groupBy="company.name" groupKey="company"> ... </f:groupedFor>
Associated revisions
[FEATURE] GroupedForViewHelper accepts property path as groupBy argument
This change allows the GroupedForViewHelper to accept not only a property/array key as
argument but also a property path. This reduces memory consumption for more complex
object graphs. Also, It enables a developer to create a custom algorithm (getter) to provide
the value to compare. The change is backwards compatible.
Related: #9244
Releases: 1.1
Change-Id: I09bdf4b6392540df05e1802068c87dd467dcb030
History
#1 Updated by Sebastian Kurfuerst about 4 years ago
- Category set to ViewHelpers
- Has patch set to Yes
#2 Updated by Jochen Rau over 3 years ago
- Status changed from New to Under Review
- Assigned To set to Jochen Rau
#3 Updated by Sebastian Kurfuerst over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 70 to 100