public function cgetAction(Request $request)
    {
        /** @var DynamicRepository $repository */
        $repository = $this->get('sulu_form.repository.dynamic');

        $filters = $this->getFilters($request);
        $page = $request->get('page', 1);
        $limit = $request->get('limit');
        $offset = (($page - 1) * $limit);
        $view = $request->get('view', 'default');
        $sortOrder = $request->get('sortOrder', 'asc');
        $sortBy = $request->get('sortBy', 'created');

        $entries = $repository->findByFilters(
            $filters,
            [$sortBy => $sortOrder],
            $limit,
            $offset
        );

        $entries = $this->get('sulu_form.list_builder.dynamic_list_factory')->build($entries, $view);

        // avoid total request when entries < limit
        if (count($entries) == $limit) {
            $total = $repository->countByFilters($filters);
        } else {
            // calculate total
            $total = count($entries) + $offset;
        }

        // create list representation
        $representation = new ListRepresentation(
            $entries,
            'dynamics',
            $request->get('_route'),
            $request->query->all(),
            $page,
            $limit,
            $total
        );

        return $this->handleView($this->view($representation));
    }