26 'elementValidator' => [
null,
'The validator type to use for the collection elements',
'string'],
27 'elementType' => [
null,
'The type of the elements in the collection',
'string'],
28 'validationGroups' => [
null,
'The validation groups to link to',
'string'],
53 $this->result = new \TYPO3\CMS\Extbase\Error\Result();
55 if ($this->acceptsEmptyValues ===
false || $this->
isEmpty($value) ===
false) {
57 $this->
addError(
'The given subject was not a collection.', 1317204797);
60 if ($value instanceof \
TYPO3\CMS\
Extbase\Persistence\Generic\LazyObjectStorage && !$value->isInitialized()) {
63 if (is_object($value)) {
86 foreach ($value as $index => $collectionElement) {
87 if (isset($this->options[
'elementValidator'])) {
88 $collectionElementValidator = $this->validatorResolver->createValidator($this->options[
'elementValidator']);
89 } elseif (isset($this->options[
'elementType'])) {
90 $collectionElementValidator = $this->validatorResolver->getBaseValidatorConjunction($this->options[
'elementType']);
95 $collectionElementValidator->setValidatedInstancesContainer($this->validatedInstancesContainer);
97 $this->result->forProperty($index)->merge($collectionElementValidator->validate($collectionElement));