addShopPageTranslation example


        $query = $this->connection->createQueryBuilder();

        $query->addSelect('page.id as arrayKey');
        $query->addSelect($this->fieldHelper->getShopPageFields());

        $query->from('s_cms_static', 'page')
            ->leftJoin('page', 's_cms_static_attributes', 'pageAttribute', 'pageAttribute.cmsStaticID = page.id')
            ->where('page.id IN (:ids)')
            ->setParameter(':ids', $ids, Connection::PARAM_INT_ARRAY);

        $this->fieldHelper->addShopPageTranslation($query$context);

        $data = $query->execute()->fetchAll(PDO::FETCH_GROUP | PDO::FETCH_UNIQUE);

        return array_map([$this->shopPageHydrator, 'hydrate']$data);
    }
}
'mapping',
            'groups.mapping_id = mapping.id'
        );

        $query->leftJoin(
            '`groups`',
            's_core_shop_pages',
            'shops',
            'groups.id = shops.group_id AND shops.shop_id = :shopId'
        );

        $this->fieldHelper->addShopPageTranslation($query$context);

        $query->andWhere('groups.active = 1')
            ->andWhere('page.active = 1')
            ->andWhere("CONCAT('|', page.grouping, '|') LIKE CONCAT('%|', groups.key, '|%')")
            ->andWhere('(mapping.id IS NULL OR shops.shop_id IS NOT NULL)')
            ->andWhere('(mapping.id IS NULL OR mapping.active=1)')
            ->andWhere('(page.shop_ids IS NULL OR page.shop_ids LIKE :staticShopId)');

        $query
            ->orderBy('parentID', 'ASC')
            ->addOrderBy('mapping.key')
            
Home | Imprint | This part of the site doesn't use cookies.