Get a paginated list of products contained in this category

@return PaginatedList
348763
public function PaginatedProducts($limit = 10)
    {
        $products = $this->SortedProducts();
        $filter = $this->getFilter();

        if (count($filter)) {
            $products = $products->filter($filter);
        }

        return PaginatedList::create(
            $products,
            $this->getRequest()
        )->setPageLength($limit);
    }
1304190
public function getCategory()
    {
        if ($this->_oCategory === null) {
            $this->_oCategory = $this->getProduct()->getCategory();
        }

        return $this->_oCategory;
    }
341153
protected function getListPage()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->page->getList(array('limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('user')) {
            return $this->page->getList(array('user_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('category')) {
            return $this->page->getList(array('category_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('store')) {
            return $this->page->getList(array('store_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->page->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
135538
public function listProducts()
    {
        $service = $this->getService();

        $response      = $service->request('products', 'GET');
        $responseArray = $this->getResponseArray($response);

        if (!$this->isError()) {
            $this->_data = $this->_normalizeResponseArray($responseArray);
        } else {
            $this->_data = array();
        }

        return $this;
    }
1042277
protected function getListPage()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        $list = (array) $this->page->getList($conditions);
        $this->prepareListPage($list);
        return $list;
    }
320112
public function getPageSizesAsList()
    {
        $pageSizes = ArrayList::create();
        $perPage = $this->getItemsPerPage();
        foreach ($this->getPageSizes() as $pageSize) {
            $pageSizes->push(array(
                'Size' => $pageSize,
                'Selected' => $pageSize == $perPage
            ));
        }
        return $pageSizes;
    }
678706
public function items()
    {
        $list = new OrderedList();

        foreach ($this->source as $key => $value) {
            $list->append([$key, $value]);
        }

        return $list;
    }
302845
protected function getIDListFromDB() : array
    {
        $arElementIDList = (array) Product::getByCategory($this->sValue)
            ->where('brand_id', '>', 0)
            ->lists('brand_id', 'id');

        $obCategory = Category::find($this->sValue);
        if (!empty($obCategory)) {
            $arAdditionalElementIDList = (array) $obCategory->product_link()
                ->where('brand_id', '>', 0)
                ->lists('brand_id', 'id');

            $arElementIDList = $arElementIDList + $arAdditionalElementIDList;
        }

        return $arElementIDList;
    }
1170259
public function paginated()
    {
        $model = $this->model;

        if (isset(request()->dir) && isset(request()->field)) {
            $model = $model->orderBy(request()->field, request()->dir);
        } else {
            $model = $model->orderBy('created_at', 'desc');
        }

        return $model->paginate(config('cms.pagination', 25));
    }
73781
private function getUnsortedProductData()
    {
        $productCollection = $this->getProductCollection()->setPageSize($this->size);

        if (!in_array($this->search, [null, ''])) {
            $productCollection->setSearchQuery($this->search);
        }

        return ['products' => $productCollection->getItems(), 'size' => $productCollection->getSize()];
    }
1030915
public function getPaginationMetaData()
    {
        $pagination = [
            'count' => $this->count,
            'offset' => $this->offset,
            'limit' => $this->limit,
            'next_page_params' => $this->getNextPageParams(),
        ];

        return $pagination;
    }
142791
public function getPagination()
    {
        $factory = new PaginationFactory(\Request::getInstance());
        if (method_exists($this, 'createPaginationObject')) {
            $pagination = $this->createPaginationObject();
            $pagination = $factory->deliverPaginationObject($this, $pagination);
        } else {
            $pagination = $factory->createPaginationObject($this);
        }
        return $pagination;
    }
453428
protected function getPagination()
    {
        if (null == $this->pagination) {
            $this->pagination = new Pagination(
                [
                    'rowsPerPage' => $this->rowsPerPage,
                    'request' => $this->getRequest()
                ]
            );
        }
        return $this->pagination;
    }
273935
public function getListItems()
    {
        // Create List:
        
        $items = ArrayList::create();
        
        // Obtain Items from Source:
        
        if ($source = $this->owner->getSource()) {
            
            // Obtain Source List:
            
            $list = $source->getListItems();
            
            // Filter List Items (if applicable):
            
            if (in_array(ListFilter::class, class_uses($source))) {
                
                if ($where = $source->getListWhere()) {
                    $list = $list->where($where);
                }
                
                foreach ($source->getListFilters() as $filter) {
                    $list = $list->filter($filter);
                }
                
            }
            
            // Merge List Items:
            
            $items->merge($list);
            
        }
        
        // Sort Items (if applicable):
        
        if ($this->owner->SortItemsBy) {
            $items = $this->sort($items);
        }
        
        // Remove Items without Images (if applicable):
        
        if ($this->owner->ImageItems) {
            
            $items = $items->filterByCallback(function ($item) {
                return $item->hasMetaImage();
            });
            
        }
        
        // Reverse Items (if applicable):
        
        if ($this->owner->ReverseItems) {
            $items = $items->reverse();
        }
        
        // Limit Items (if applicable):
        
        if ($limit = $this->owner->NumberOfItems) {
            $items = $items->limit($limit);
        }
        
        // Paginate Items (if applicable):
        
        if ($this->owner->PaginateItems && $this->owner->SortItemsBy != self::SORT_RANDOM) {
            
            $items = PaginatedList::create($items, $this->getRequest());
            
            $items->setPaginationGetVar($this->owner->getPaginationGetVar());
            
            if ($this->owner->ItemsPerPage) {
                $items->setPageLength($this->owner->ItemsPerPage);
            }
            
        }
        
        // Associate Items with Rendering Component:
        
        foreach ($items as $item) {
            $item->setRenderer($this->owner);
        }
        
        // Answer List:
        
        return $items;
    }
178092
public function getList()
    {
        /** @var Select|QueryObjectInterface $query */
        $query = $this->getRepository()->find();
        $this->getFilters()->apply($query);
        $this->getPagination()->setTotal($query->count());
        $query->order($this->getOrder());
        $query->limit(
            $this->getPagination()->rowsPerPage,
            $this->getPagination()->offset
        );
        return $query->all();
    }
1045559
public function index()
    {
        $query = $this->Posts->find()->contain([
            'Categories' => ['fields' => ['id', 'title']],
            'Tags' => function (Query $q) {
                return $q->order(['tag' => 'ASC']);
            },
            'Users' => ['fields' => ['id', 'first_name', 'last_name']],
        ]);

        $this->paginate['order'] = ['created' => 'DESC'];

        $posts = $this->paginate($this->Posts->queryFromFilter($query, $this->request->getQueryParams()));

        $this->set(compact('posts'));
    }
511529
public function getWishProductList()
    {
        if ($this->_aWishProductList === null) {
            $this->_aWishProductList = false;
            if ($oWishList = $this->getWishList()) {
                $this->_aWishProductList = $oWishList->getArticles();
            }
        }

        return $this->_aWishProductList;
    }