addCategoryTranslation example

->leftJoin('media', 's_media_album_settings', 'mediaSettings', 'mediaSettings.albumID = media.albumID')
            ->leftJoin('media', 's_media_attributes', 'mediaAttribute', 'mediaAttribute.mediaID = media.id')
            ->leftJoin('category', 's_product_streams', 'stream', 'category.stream_id = stream.id')
            ->leftJoin('stream', 's_product_streams_attributes', 'productStreamAttribute', 'stream.id = productStreamAttribute.streamId')
            ->where('category.id IN (:categories)')
            ->andWhere('category.active = 1')
            ->andWhere('category.shops IS NULL OR category.shops LIKE :shopId')
            ->addGroupBy('category.id')
            ->setParameter(':categories', $ids, Connection::PARAM_INT_ARRAY)
            ->setParameter(':shopId', '%|' . $context->getShop()->getId() . '|%');

        $this->fieldHelper->addCategoryTranslation($query$context);
        $this->fieldHelper->addMediaTranslation($query$context);
        $this->fieldHelper->addProductStreamTranslation($query$context);
        $this->fieldHelper->addCategoryMainDataTranslation($query$context);

        return $query;
    }

    public function getMapping(array $ids): QueryBuilder
    {
        $query = $this->connection->createQueryBuilder();

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