@@ 87-94 (lines=8) @@ | ||
84 | continue; |
|
85 | } |
|
86 | ||
87 | if ($this->isPropertyNested($property, $resourceClass)) { |
|
88 | $propertyParts = $this->splitPropertyParts($property, $resourceClass); |
|
89 | $field = $propertyParts['field']; |
|
90 | $metadata = $this->getNestedMetadata($resourceClass, $propertyParts['associations']); |
|
91 | } else { |
|
92 | $field = $property; |
|
93 | $metadata = $this->getClassMetadata($resourceClass); |
|
94 | } |
|
95 | ||
96 | if ($metadata->hasField($field)) { |
|
97 | $typeOfField = $this->getType($metadata->getTypeOfField($field)); |
@@ 134-140 (lines=7) @@ | ||
131 | */ |
|
132 | protected function isPropertyMapped(string $property, string $resourceClass, bool $allowAssociation = false): bool |
|
133 | { |
|
134 | if ($this->isPropertyNested($property, $resourceClass)) { |
|
135 | $propertyParts = $this->splitPropertyParts($property, $resourceClass); |
|
136 | $metadata = $this->getNestedMetadata($resourceClass, $propertyParts['associations']); |
|
137 | $property = $propertyParts['field']; |
|
138 | } else { |
|
139 | $metadata = $this->getClassMetadata($resourceClass); |
|
140 | } |
|
141 | ||
142 | return $metadata->hasField($property) || ($allowAssociation && $metadata->hasAssociation($property)); |
|
143 | } |