resolveMappings example

$parents = $this->factory->resolveDelete($definition$ids);
        }

        $commandQueue = new WriteCommandQueue();
        $notFound = $this->extractDeleteCommands($definition$ids$writeContext$commandQueue);

        $writeContext->setLanguages($this->languageLoader->loadLanguages());
        $this->gateway->execute($commandQueue->getCommandsInOrder()$writeContext);

        $result = $this->factory->build($commandQueue);

        $parents = array_merge_recursive($parents$this->factory->resolveMappings($result));

        return $this->factory->addDeleteResults($result$notFound$parents);
    }

    /** * @param array<mixed> $rawData * * @return array<mixed> */
    private function write(EntityDefinition $definition, array $rawData, WriteContext $writeContext, ?string $ensure = null): array
    {
        

        $bannerPath = $element->getConfig()->get('file');
        $media = $collection->getMediaByPath($bannerPath);
        $element->getData()->set('media', $media);

        if ($media) {
            $fileInfo = ['width' => $media->getWidth(), 'height' => $media->getHeight()];
            $element->getConfig()->set('fileInfo', $fileInfo);
        }

        // hydrate mappings with products         $this->resolveMappings($collection$element);
    }

    private function generateLink(Element $element, ShopContextInterface $context): void
    {
        $link = $element->getConfig()->get('link');
        if (empty($link)) {
            return;
        }

        preg_match('/^([a-z]*:\/\/|shopware\.php|mailto:)/i', $link$matches);

        
Home | Imprint | This part of the site doesn't use cookies.