findStruct example

$dataBag = new SeoResolverData();

        $this->find($dataBag$response->getObject());
        $this->enrich($dataBag$event->getRequest()->attributes->get(PlatformRequest::ATTRIBUTE_SALES_CHANNEL_CONTEXT_OBJECT));
    }

    private function find(SeoResolverData $data, Struct $struct): void
    {
        if ($struct instanceof AggregationResultCollection) {
            foreach ($struct as $item) {
                $this->findStruct($data$item);
            }
        }

        if ($struct instanceof EntitySearchResult) {
            foreach ($struct->getEntities() as $entity) {
                $this->findStruct($data$entity);
            }
        }

        if ($struct instanceof Collection) {
            foreach ($struct as $item) {
                
Home | Imprint | This part of the site doesn't use cookies.