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-catalog-inventory
Model
Plugin
FilterCustomAttribute.php
Go to the documentation of this file.
1
<?php
8
namespace
Magento\CatalogInventory\Model\Plugin
;
9
10
use
Magento\Catalog\Model\Product\Attribute\Repository
;
11
use
Magento\Catalog\Model\FilterProductCustomAttribute
as Filter;
12
13
class
FilterCustomAttribute
14
{
18
private
$filter;
19
24
public
function
__construct
(Filter $filter)
25
{
26
$this->filter = $filter;
27
}
28
38
public
function
afterGetCustomAttributesMetadata
(
Repository
$repository
, array
$attributes
): array
39
{
40
$return = [];
41
foreach
(
$attributes
as
$attribute
) {
42
$return[
$attribute
->getAttributeCode()] =
$attribute
;
43
}
44
45
return
$this->filter->execute($return);
46
}
47
}
Magento\CatalogInventory\Model\Plugin
Definition:
ProductSearchTest.php:9
$attribute
$attribute
Definition:
attribute_set_with_image_attribute.php:41
Magento\Catalog\Model\Product\Attribute\Repository
Definition:
Repository.php:16
Magento\Catalog\Model\FilterProductCustomAttribute
Definition:
FilterProductCustomAttribute.php:13
Magento\CatalogInventory\Model\Plugin\FilterCustomAttribute\afterGetCustomAttributesMetadata
afterGetCustomAttributesMetadata(Repository $repository, array $attributes)
Definition:
FilterCustomAttribute.php:38
Magento\CatalogInventory\Model\Plugin\FilterCustomAttribute
Definition:
FilterCustomAttribute.php:13
$attributes
$attributes
Definition:
matrix.phtml:13
$repository
$repository
Definition:
order_item_with_product_and_custom_options.php:24
Magento\CatalogInventory\Model\Plugin\FilterCustomAttribute\__construct
__construct(Filter $filter)
Definition:
FilterCustomAttribute.php:24