Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
LayerFilters.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
13 
18 {
22  private $filtersDataProvider;
23 
27  public function __construct(
28  \Magento\CatalogGraphQl\Model\Resolver\Layer\DataProvider\Filters $filtersDataProvider
29  ) {
30  $this->filtersDataProvider = $filtersDataProvider;
31  }
32 
36  public function resolve(
37  Field $field,
38  $context,
40  array $value = null,
41  array $args = null
42  ) {
43  if (!isset($value['layer_type'])) {
44  return null;
45  }
46 
47  return $this->filtersDataProvider->getData($value['layer_type']);
48  }
49 }
$value
Definition: gender.phtml:16
resolve(Field $field, $context, ResolveInfo $info, array $value=null, array $args=null)
__construct(\Magento\CatalogGraphQl\Model\Resolver\Layer\DataProvider\Filters $filtersDataProvider)
foreach( $_productCollection as $_product)() ?>" class $info
Definition: listing.phtml:52