Actions
Bug #78546
openCollectionValidator is not automatically assigned to ObjectStorage parameters of an action
Status:
New
Priority:
Could have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2016-11-02
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
Consider the following action:
/** * @param \Vendor\Ext\Domain\Model\MyModel $myModel * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Vendor\Ext\Domain\Model\MyModel> $myModelList */ public function objectStorageAction($myModel, $myModelList)
Validation of first argument is executed, also due to recursive validation sub-properties are validated too, including validation of ObjectStorages and elements inside of them.
Validation of second argument is not executed, and so no validation of elements is performed.
This can be fixed with annotation:
@validate $myModelList Collection(elementType=\Vendor\Ext\Domain\Model\MyModel)
But would be much more convenient, if ExtBase could detect it from @param definition.
No data to display
Actions