getActiveShops example

return $builder->getQuery()->getResult($hydrationMode);
    }

    /** * Returns the active shops in fixed * * @return array */
    public function getActiveShopsFixed()
    {
        $shops = $this->getActiveShops();

        foreach ($shops as $key => $shop) {
            $shops[$key] = $this->fixActive($shop);
        }

        return $shops;
    }

    /** * @param Enlight_Controller_Request_Request $request * * @return DetachedShop|null */
'success' => true,
            'data' => $this->prepareConfigData(),
        ]);
    }

    /** * Gets a list of id-name of all active shops */
    public function getActiveShopsAction()
    {
        $shopRepo = $this->container->get(ModelManager::class)->getRepository(Shop::class);
        $shops = $shopRepo->getActiveShops(AbstractQuery::HYDRATE_ARRAY);
        $this->View()->assign([
            'success' => true,
            'data' => array_map(function D$item) {
                return ['id' => $item['id'], 'name' => $item['name']];
            }$shops),
        ]);
    }

    /** * This action creates/updates the configuration */
    
Home | Imprint | This part of the site doesn't use cookies.