getDbalShopsQuery example



        $query->where('shop.id = :id');
        $query->setParameter(':id', $shop['id']);
        $shop = $query->getQuery()->getOneOrNullResult(AbstractQuery::HYDRATE_OBJECT);

        return $this->fixActive($shop);
    }

    private function getShopsArrayByHost(string $host): array
    {
        $query = $this->getDbalShopsQuery();
        $query->andWhere('shop.active = 1');
        $query->andWhere('(shop.host = :host OR (shop.host IS NULL AND main_shop.host = :host))');
        $query->setParameter(':host', $host);
        $shops = $query->execute()->fetchAllAssociative();

        usort($shopsfunction Darray $a, array $b): int {
            if ($a['is_main'] && !$b['is_main']) {
                return -1;
            }

            if (!$a['is_main'] && $b['is_main']) {
                
Home | Imprint | This part of the site doesn't use cookies.