Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FilterCustomAttribute.php
Go to the documentation of this file.
1 <?php
9 
12 
14 {
18  private $filter;
19 
24  public function __construct(Filter $filter)
25  {
26  $this->filter = $filter;
27  }
28 
39  {
40  $return = [];
41  foreach ($attributes as $attribute) {
42  $return[$attribute->getAttributeCode()] = $attribute;
43  }
44 
45  return $this->filter->execute($return);
46  }
47 }
afterGetCustomAttributesMetadata(Repository $repository, array $attributes)
$attributes
Definition: matrix.phtml:13