Bug #56107

Property mapping configuration only supports one wildcard at a time

Added by Bastian Waidelich over 7 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Property
Target version:
-
Start date:
2014-02-19
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

The PropertyMapper supports wildcards (introduced with #37436) in the form:

$propertyMappingConfiguration->forProperty('items.*')->allowAllProperties();

Unfortunately this only works for one placeholder at a time. The following will never apply:

$propertyMappingConfiguration->forProperty('items.*.addons.*')->allowAllProperties();

The only work-around I can think of is:

$someArgument = $this->request->getArgument('object');
$numberOfItems = isset($someArgument['items']) ? count($someArgument['items']) : 0;
for ($itemIndex = 0; $itemIndex < $numberOfItems; $itemIndex ++) {
  $propertyMappingConfiguration->forProperty('items.' . $itemIndex . '.addons.*')->allowAllProperties();
}


Related issues

Related to TYPO3.Flow - Feature #37436: PropertyMapper should allow settings like allowCreationForSubProperty('products.[n].tierprices.[n]')ResolvedChristopher Hlubek2012-05-23

Actions

No data to display

Also available in: Atom PDF