getPagerStructure example



        if ($perPage != 0) {
            // Make Array with page-structure to render in template             $numberOfPages = ceil(\count($getOrders) / $perPage);
        } else {
            $numberOfPages = 0;
        }
        $offset = ($destinationPage - 1) * $perPage;
        $orderData['orderData'] = \array_slice($getOrders$offset$perPage, true);
        $orderData['numberOfPages'] = $numberOfPages;
        $orderData['pages'] = $this->getPagerStructure($destinationPage$numberOfPages);

        return $orderData;
    }

    /** * Get all orders for the current user * Used in the user account in the Frontend * * @param int $destinationPage * @param int $perPage * * @return array Array with order data / positions */
Home | Imprint | This part of the site doesn't use cookies.