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
FilterPool.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\View\Element\UiComponent\DataProvider
;
8
9
use
Magento\Framework\Data\Collection
;
10
use
Magento\Framework\Api\Search\SearchCriteriaInterface
;
11
18
class
FilterPool
19
{
23
protected
$appliers
;
24
28
public
function
__construct
(array
$appliers
= [])
29
{
30
$this->appliers =
$appliers
;
31
}
32
38
public
function
applyFilters(
Collection
$collection
,
SearchCriteriaInterface
$criteria)
39
{
40
foreach
($criteria->
getFilterGroups
() as $filterGroup) {
41
foreach
($filterGroup->getFilters() as $filter) {
43
if
(isset($this->appliers[$filter->getConditionType()])) {
44
$filterApplier = $this->appliers[$filter->getConditionType()];
45
}
else
{
46
$filterApplier = $this->appliers[
'regular'
];
47
}
48
$filterApplier->apply(
$collection
, $filter);
49
}
50
}
51
}
52
}
Magento\Framework\Data\Collection
Definition:
AbstractDb.php:6
Magento\Framework\View\Element\UiComponent\DataProvider\FilterPool\__construct
__construct(array $appliers=[])
Definition:
FilterPool.php:28
Magento\Framework\View\Element\UiComponent\DataProvider\FilterPool\$appliers
$appliers
Definition:
FilterPool.php:23
Magento\Framework\View\Element\UiComponent\DataProvider
Definition:
CollectionFactory.php:7
Magento\Framework\Api\SearchCriteriaInterface\getFilterGroups
getFilterGroups()
Magento\Framework\View\Element\UiComponent\DataProvider\FilterPool
Definition:
FilterPool.php:18
Magento\Framework\Api\Search\SearchCriteriaInterface
Definition:
SearchCriteriaInterface.php:17
Magento\Framework\Data\Collection
Definition:
Collection.php:19
$collection
$collection
Definition:
catalog_category_with_apostrophe_rollback.php:17