Feature #9244

Add support for subproperty and __toString() in GroupedForViewHelper

Added by Xavier Perseguers almost 11 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
ViewHelpers
Target version:
-
Start date:
2010-08-11
Due date:
% Done:

100%

Estimated time:
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>

Files

groupedFor.diff (1.64 KB) groupedFor.diff Xavier Perseguers, 2010-08-11 09:05
#1

Updated by Sebastian Kurfuerst about 10 years ago

  • Category set to ViewHelpers
  • Has patch set to Yes
#2

Updated by Jochen Rau over 9 years ago

  • Status changed from New to Under Review
  • Assignee set to Jochen Rau
#3

Updated by Sebastian Kurfuerst over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 70 to 100

Also available in: Atom PDF