| @@ 189-209 (lines=21) @@ | ||
| 186 | * @param int $startIndex |
|
| 187 | * @param int $endIndex |
|
| 188 | */ |
|
| 189 | protected function addEntityModifiers(FeedBuilderInterface $builder, $startIndex, $endIndex) |
|
| 190 | { |
|
| 191 | // skip id |
|
| 192 | $mappedFields = array_filter($this->getMappedFields(), function ($value) { |
|
| 193 | return $value !== 'id'; |
|
| 194 | }); |
|
| 195 | ||
| 196 | foreach ($mappedFields as $key) { |
|
| 197 | // see if association is in meta |
|
| 198 | if (null !== $mapping = $this->getAssociationMapping($key)) { |
|
| 199 | $this->addAssociationModifiers($builder, $key, $mapping, $startIndex, $endIndex); |
|
| 200 | continue; |
|
| 201 | } |
|
| 202 | ||
| 203 | // see if field is in meta |
|
| 204 | if (null !== $mapping = $this->getFieldMapping($key)) { |
|
| 205 | $this->addFieldModifiers($builder, $key, $mapping, $startIndex, $endIndex); |
|
| 206 | continue; |
|
| 207 | } |
|
| 208 | } |
|
| 209 | } |
|
| 210 | ||
| 211 | /** |
|
| 212 | * @param FeedBuilderInterface $builder |
|
| @@ 247-267 (lines=21) @@ | ||
| 244 | * @param int $startIndex |
|
| 245 | * @param int $endIndex |
|
| 246 | */ |
|
| 247 | protected function addEntityModifiers(ParserBuilderInterface $parser, $startIndex, $endIndex) |
|
| 248 | { |
|
| 249 | // skip id |
|
| 250 | $mappedFields = array_filter($this->getMappedFields(), function ($value) { |
|
| 251 | return $value !== 'id'; |
|
| 252 | }); |
|
| 253 | ||
| 254 | foreach ($mappedFields as $key) { |
|
| 255 | // see if association is in meta |
|
| 256 | if (null !== $mapping = $this->getAssociationMapping($key)) { |
|
| 257 | $this->addAssociationModifiers($parser, $key, $mapping, $startIndex, $endIndex); |
|
| 258 | continue; |
|
| 259 | } |
|
| 260 | ||
| 261 | // see if field is in meta |
|
| 262 | if (null !== $mapping = $this->getFieldMapping($key)) { |
|
| 263 | $this->addFieldModifiers($parser, $key, $mapping, $startIndex, $endIndex); |
|
| 264 | continue; |
|
| 265 | } |
|
| 266 | } |
|
| 267 | } |
|
| 268 | ||
| 269 | /** |
|
| 270 | * @param ParserBuilderInterface $parser |
|