Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Context.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
13 
17 class Context implements \Magento\Catalog\Model\Layer\ContextInterface
18 {
22  private $collectionProvider;
23 
27  private $stateKey;
28 
32  private $collectionFilter;
33 
39  public function __construct(
40  ItemCollectionProviderInterface $collectionProvider,
41  StateKeyInterface $stateKey,
42  CollectionFilterInterface $collectionFilter
43  ) {
44  $this->collectionProvider = $collectionProvider;
45  $this->stateKey = $stateKey;
46  $this->collectionFilter = $collectionFilter;
47  }
48 
53  {
54  return $this->collectionProvider;
55  }
56 
60  public function getStateKey() : StateKeyInterface
61  {
62  return $this->stateKey;
63  }
64 
69  {
70  return $this->collectionFilter;
71  }
72 }
__construct(ItemCollectionProviderInterface $collectionProvider, StateKeyInterface $stateKey, CollectionFilterInterface $collectionFilter)
Definition: Context.php:39