getCustomerRepository example


    public function loadStoresAction()
    {
        $id = $this->Request()->getParam('articleId');
        $priceGroups = $this->getRepository()->getPriceGroupQuery()->getArrayResult();
        $suppliers = $this->getRepository()->getSuppliersQuery()->getArrayResult();
        $shops = $this->getShopRepository()->createQueryBuilder('shops')->andWhere('shops.active = 1')->getQuery()->getArrayResult();
        $taxes = $this->getRepository()->getTaxesQuery()->getArrayResult();
        $templates = $this->getTemplates();
        $units = $this->getRepository()->getUnitsQuery()->getArrayResult();
        $customerGroups = $this->getCustomerRepository()->getCustomerGroupsQuery()->getArrayResult();
        $properties = $this->getRepository()->getPropertiesQuery()->getArrayResult();
        $configuratorGroups = $this->getRepository()->getConfiguratorGroupsQuery()->getArrayResult();

        if (!empty($id)) {
            $product = $this->getArticle($id);
        } else {
            $product = $this->getNewArticleData();
        }

        $this->View()->assign([
            'success' => true,
            
/** * returns a JSON string to the view the customers for the customer group mapping */
    public function getCustomerGroupsAction()
    {
        $usedIds = $this->Request()->usedIds;

        $offset = (int) $this->Request()->getParam('start');
        $limit = (int) $this->Request()->getParam('limit', 20);

        $customerRepository = $this->getCustomerRepository();
        $dataQuery = $customerRepository->getCustomerGroupsWithoutIdsQuery($usedIds$offset$limit);

        $total = $this->em->getQueryCount($dataQuery);
        $data = $dataQuery->getArrayResult();

        // Return the data and total count         $this->View()->assign(['success' => true, 'data' => $data, 'total' => $total]);
    }

    /** * moves a category by the categoryId under a new parent node */
Home | Imprint | This part of the site doesn't use cookies.