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
module-bundle
Model
ResourceModel
Selection
Collection
FilterApplier.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Bundle\Model\ResourceModel\Selection\Collection
;
7
8
use
Magento\Bundle\Model\ResourceModel\Selection\Collection
;
9
16
class
FilterApplier
17
{
21
private
$conditionTypesMap = [
22
'eq'
=>
' = ?'
,
23
'in'
=>
'IN (?)'
24
];
25
36
public
function
apply
(
Collection
$collection
, $field,
$value
, $conditionType =
'eq'
)
37
{
38
foreach
(
$collection
->getSelect()->getPart(
'from'
) as $tableAlias =>
$data
) {
39
if
(
$data
[
'tableName'
] ==
$collection
->getTable(
'catalog_product_bundle_selection'
)) {
40
$field = $tableAlias .
'.'
. $field;
41
}
42
}
43
44
$collection
->getSelect()
45
->where($field . $this->conditionTypesMap[$conditionType],
$value
);
46
}
47
}
Magento\Bundle\Model\ResourceModel\Selection\Collection
Definition:
FilterApplier.php:6
Magento\Bundle\Model\ResourceModel\Selection\Collection\FilterApplier\apply
apply(Collection $collection, $field, $value, $conditionType='eq')
Definition:
FilterApplier.php:36
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
$value
$value
Definition:
gender.phtml:16
Magento\Bundle\Model\ResourceModel\Selection\Collection
Definition:
Collection.php:20
$collection
$collection
Definition:
catalog_category_with_apostrophe_rollback.php:17
Magento\Bundle\Model\ResourceModel\Selection\Collection\FilterApplier
Definition:
FilterApplier.php:16