File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,25 @@ public function iterateVariables(
7373 }
7474
7575 foreach ($ attributes as $ attribute ) {
76- if ($ attribute ->getName () === \Spameri \Elastic \Mapping \STIEntity::class) {
76+ if ($ attribute ->getName () === \Spameri \Elastic \Mapping \Collection::class) {
77+ if ($ property === null ) {
78+ continue 2 ;
79+ }
80+
81+ /** @var \Spameri\Elastic\Entity\EntityInterface $item */
82+ foreach ($ property as $ item ) {
83+ $ collectionItemData = $ this ->iterateVariables (
84+ $ item ->entityVariables (),
85+ $ this ->reflection ->createReflection ($ item ::class),
86+ );
87+ $ collectionItemData [self ::ENTITY_CLASS ] = $ item ::class;
88+
89+ $ preparedArray [$ key ][] = $ collectionItemData ;
90+ }
91+
92+ continue 2 ;
93+
94+ } elseif ($ attribute ->getName () === \Spameri \Elastic \Mapping \STIEntity::class) {
7795 if ($ property === null ) {
7896 continue 2 ;
7997 }
You can’t perform that action at this time.
0 commit comments