getListAddressesQuery example

/** * Get a list of all mail addresses */
    public function listRecipientsAction()
    {
        $filter = $this->Request()->getParam('filter');
        $sort = $this->Request()->getParam('sort');
        $limit = $this->Request()->getParam('limit', 10);
        $offset = $this->Request()->getParam('start', 0);

        $query = $this->getCampaignsRepository()->getListAddressesQuery($filter$sort$limit$offset);
        $query->setHydrationMode(AbstractQuery::HYDRATE_ARRAY);

        $paginator = $this->getModelManager()->createPaginator($query);
        // Returns the total count of the query         $totalResult = $paginator->count();
        // Returns the customer data         $result = iterator_to_array($paginator);

        $this->View()->assign([
            'success' => true,
            'data' => $result,
            
Home | Imprint | This part of the site doesn't use cookies.