Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Catalog\Model\Layer\ContextInterface $context, \Magento\Catalog\Model\Layer\StateFactory $layerStateFactory, AttributeCollectionFactory $attributeCollectionFactory, \Magento\Catalog\Model\ResourceModel\Product $catalogProduct, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Registry $registry, CategoryRepositoryInterface $categoryRepository, array $data=[]) | |
getStateKey () | |
getProductCollection () | |
prepareProductCollection ($collection) | |
apply () | |
getCurrentCategory () | |
setCurrentCategory ($category) | |
getCurrentStore () | |
getState () | |
![]() | |
__construct (array $data=[]) | |
addData (array $arr) | |
setData ($key, $value=null) | |
unsetData ($key=null) | |
getData ($key='', $index=null) | |
getDataByPath ($path) | |
getDataByKey ($key) | |
setDataUsingMethod ($key, $args=[]) | |
getDataUsingMethod ($key, $args=null) | |
hasData ($key='') | |
toArray (array $keys=[]) | |
convertToArray (array $keys=[]) | |
toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true) | |
convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true) | |
toJson (array $keys=[]) | |
convertToJson (array $keys=[]) | |
toString ($format='') | |
__call ($method, $args) | |
isEmpty () | |
serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"') | |
debug ($data=null, &$objects=[]) | |
offsetSet ($offset, $value) | |
offsetExists ($offset) | |
offsetUnset ($offset) | |
offsetGet ($offset) | |
Protected Attributes | |
$_productCollections = [] | |
$_stateKey = null | |
$registry = null | |
$_storeManager | |
$_catalogProduct | |
$_attributeCollectionFactory | |
$_layerStateFactory | |
$collectionProvider | |
$stateKeyGenerator | |
$collectionFilter | |
$categoryRepository | |
![]() | |
$_data = [] | |
Additional Inherited Members | |
![]() | |
_getData ($key) | |
_underscore ($name) | |
![]() | |
static | $_underscoreCache = [] |
Catalog view layer model
@api @SuppressWarnings(PHPMD.LongVariable) @SuppressWarnings(PHPMD.CouplingBetweenObjects)
__construct | ( | \Magento\Catalog\Model\Layer\ContextInterface | $context, |
\Magento\Catalog\Model\Layer\StateFactory | $layerStateFactory, | ||
AttributeCollectionFactory | $attributeCollectionFactory, | ||
\Magento\Catalog\Model\ResourceModel\Product | $catalogProduct, | ||
\Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
\Magento\Framework\Registry | $registry, | ||
CategoryRepositoryInterface | $categoryRepository, | ||
array | $data = [] |
||
) |
Layer\ContextInterface | $context | |
Layer\StateFactory | $layerStateFactory | |
AttributeCollectionFactory | $attributeCollectionFactory | |
\Magento\Catalog\Model\ResourceModel\Product | $catalogProduct | |
\Magento\Store\Model\StoreManagerInterface | $storeManager | |
\Magento\Framework\Registry | $registry | |
CategoryRepositoryInterface | $categoryRepository | |
array | $data |
Definition at line 101 of file Layer.php.
apply | ( | ) |
Apply layer Method is colling after apply all filters, can be used for prepare some index data before getting information about existing indexes
getCurrentCategory | ( | ) |
getCurrentStore | ( | ) |
getProductCollection | ( | ) |
Retrieve current layer product collection
Definition at line 141 of file Layer.php.
getState | ( | ) |
prepareProductCollection | ( | $collection | ) |
setCurrentCategory | ( | $category | ) |