Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
View
Element
UiComponent
DataProvider
Reporting.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\View\Element\UiComponent\DataProvider
;
7
8
use
Magento\Framework\Api\Search\ReportingInterface
;
9
use
Magento\Framework\Api\Search\SearchCriteriaInterface
;
10
use
Magento\Framework\Api\Search\SearchResultInterface
;
11
15
class
Reporting
implements
ReportingInterface
16
{
20
protected
$collectionFactory
;
21
25
protected
$filterPool
;
26
31
public
function
__construct
(
32
CollectionFactory
$collectionFactory
,
33
FilterPool
$filterPool
34
) {
35
$this->collectionFactory =
$collectionFactory
;
36
$this->filterPool =
$filterPool
;
37
}
38
43
public
function
search
(
SearchCriteriaInterface
$searchCriteria
)
44
{
45
$collection
= $this->collectionFactory->getReport(
$searchCriteria
->getRequestName());
46
$collection
->setPageSize(
$searchCriteria
->getPageSize());
47
$collection
->setCurPage(
$searchCriteria
->getCurrentPage());
48
$this->filterPool->applyFilters(
$collection
,
$searchCriteria
);
49
foreach
(
$searchCriteria
->getSortOrders() as $sortOrder) {
50
if
($sortOrder->getField()) {
51
$collection
->setOrder($sortOrder->getField(), $sortOrder->getDirection());
52
}
53
}
54
return
$collection
;
55
}
56
}
Magento\Framework\View\Element\UiComponent\DataProvider\Reporting
Definition:
Reporting.php:15
Magento\Framework\View\Element\UiComponent\DataProvider\Reporting\__construct
__construct(CollectionFactory $collectionFactory, FilterPool $filterPool)
Definition:
Reporting.php:31
Magento\Framework\View\Element\UiComponent\DataProvider
Definition:
CollectionFactory.php:7
Magento\Framework\View\Element\UiComponent\DataProvider\Reporting\search
search(SearchCriteriaInterface $searchCriteria)
Definition:
Reporting.php:43
$searchCriteria
$searchCriteria
Definition:
order_rollback.php:16
Magento\Framework\Api\Search\SearchResultInterface
Definition:
SearchResultInterface.php:16
Magento\Framework\View\Element\UiComponent\DataProvider\Reporting\$filterPool
$filterPool
Definition:
Reporting.php:25
Magento\Framework\View\Element\UiComponent\DataProvider\FilterPool
Definition:
FilterPool.php:18
Magento\Framework\Api\Search\SearchCriteriaInterface
Definition:
SearchCriteriaInterface.php:17
Magento\Framework\Api\Search\ReportingInterface
Definition:
ReportingInterface.php:11
Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory
Definition:
CollectionFactory.php:15
Magento\Framework\View\Element\UiComponent\DataProvider\Reporting\$collectionFactory
$collectionFactory
Definition:
Reporting.php:20
$collection
$collection
Definition:
catalog_category_with_apostrophe_rollback.php:17