@@ 284-296 (lines=13) @@ | ||
281 | * @throws \Nnx\FormComparator\Comparator\CollectionDiffService\Exception\RuntimeException |
|
282 | * @throws \Nnx\FormComparator\Comparator\Exception\DomainException |
|
283 | */ |
|
284 | protected function markNestedElementsAsDeletedInFieldset(FieldsetInterface $deletedFieldset, $prefixPath) |
|
285 | { |
|
286 | foreach ($deletedFieldset->getIterator() as $childElementOrFieldset) { |
|
287 | /** @var ElementInterface $childElementOrFieldset */ |
|
288 | Assert::isInstanceOf($childElementOrFieldset, ElementInterface::class); |
|
289 | ||
290 | $childElementOrFieldsetName = $childElementOrFieldset->getName(); |
|
291 | $pathToDeletedElement = $this->buildPathToElementOrFieldset($childElementOrFieldsetName, $prefixPath); |
|
292 | ||
293 | $this->runDeleteElementStrategy($childElementOrFieldset, $pathToDeletedElement); |
|
294 | ||
295 | } |
|
296 | } |
|
297 | ||
298 | /** |
|
299 | * Помечает вложенные элемента Fieldset'a как добавленные |
|
@@ 307-317 (lines=11) @@ | ||
304 | * @throws \Nnx\FormComparator\Comparator\CollectionDiffService\Exception\RuntimeException |
|
305 | * @throws \Nnx\FormComparator\Comparator\Exception\DomainException |
|
306 | */ |
|
307 | protected function markNestedElementsAsInsertedInFieldset(FieldsetInterface $insertedFieldset, $prefixPath) |
|
308 | { |
|
309 | foreach ($insertedFieldset->getIterator() as $childElementOrFieldset) { |
|
310 | /** @var ElementInterface $childElementOrFieldset */ |
|
311 | Assert::isInstanceOf($childElementOrFieldset, ElementInterface::class); |
|
312 | ||
313 | $childElementOrFieldsetName = $childElementOrFieldset->getName(); |
|
314 | $pathToInsertedElement = $this->buildPathToElementOrFieldset($childElementOrFieldsetName, $prefixPath); |
|
315 | $this->runInsertedElementStrategy($childElementOrFieldset, $pathToInsertedElement); |
|
316 | } |
|
317 | } |
|
318 | ||
319 | ||
320 | /** |