addCategoryMainDataTranslation example

->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();

        $query->select(['mapping.articleID', 'GROUP_CONCAT(DISTINCT mapping.categoryID)']);

        $query->from('s_articles_categories_ro', 'mapping')
            
Home | Imprint | This part of the site doesn't use cookies.