Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Protected Member Functions | |
_construct () | |
_beforeLoad () | |
_afterLoad () | |
_loadProductCount () | |
![]() | |
getEntityPkName (\Magento\Eav\Model\Entity\AbstractEntity $entity) | |
_getLoadAttributesSelect ($table, $attributeIds=[]) | |
_addLoadAttributesSelectValues ($select, $table, $type) | |
_joinAttributeToSelect ($method, $attribute, $tableAlias, $condition, $fieldCode, $fieldAlias) | |
![]() | |
_construct () | |
_prepareStaticFields () | |
_initSelect () | |
_init ($model, $entityModel) | |
_prepareOrderExpression ($field) | |
_getAllIdsSelect ($limit=null, $offset=null) | |
_getLoadAttributesSelect ($table, $attributeIds=[]) | |
_addLoadAttributesSelectValues ($select, $table, $type) | |
_setItemAttributeValue ($valueInfo) | |
_getAttributeTableAlias ($attributeCode) | |
_getAttributeFieldName ($attributeCode) | |
_addAttributeJoin ($attributeCode, $joinType='inner') | |
getEntityPkName (\Magento\Eav\Model\Entity\AbstractEntity $entity) | |
_joinAttributeToSelect ($method, $attribute, $tableAlias, $condition, $fieldCode, $fieldAlias) | |
_getAttributeConditionSql ($attribute, $condition, $joinType='inner') | |
_renderOrders () | |
_afterLoad () | |
_reset () | |
![]() | |
_setIdFieldName ($fieldName) | |
_getItemId (\Magento\Framework\DataObject $item) | |
_renderFilters () | |
_renderFiltersBefore () | |
_translateCondition ($field, $condition) | |
_getMappedField ($field) | |
_getMapper () | |
_getConditionSql ($fieldName, $condition) | |
_getConditionFieldName ($fieldName) | |
_renderOrders () | |
_renderLimit () | |
_beforeLoad () | |
beforeAddLoadedItem (\Magento\Framework\DataObject $item) | |
_toOptionArray ($valueField=null, $labelField='name', $additional=[]) | |
_toOptionHash ($valueField=null, $labelField='name') | |
_afterLoadData () | |
_afterLoad () | |
_logQuery ($sql) | |
_reset () | |
_fetchAll (Select $select) | |
_initSelect () | |
![]() | |
_setIsLoaded ($flag=true) | |
_addItem ($item) | |
_getItemId (\Magento\Framework\DataObject $item) | |
_renderFilters () | |
_renderOrders () | |
_renderLimit () | |
_toOptionArray ($valueField='id', $labelField='name', $additional=[]) | |
_toOptionHash ($valueField='id', $labelField='name') | |
Additional Inherited Members | |
![]() | |
const | ATTRIBUTE_TABLE_ALIAS_PREFIX = 'at_' |
![]() | |
const | SORT_ORDER_ASC = 'ASC' |
const | SORT_ORDER_DESC = 'DESC' |
__construct | ( | \Magento\Framework\Data\Collection\EntityFactory | $entityFactory, |
\Psr\Log\LoggerInterface | $logger, | ||
\Magento\Framework\Data\Collection\Db\FetchStrategyInterface | $fetchStrategy, | ||
\Magento\Framework\Event\ManagerInterface | $eventManager, | ||
\Magento\Eav\Model\Config | $eavConfig, | ||
\Magento\Framework\App\ResourceConnection | $resource, | ||
\Magento\Eav\Model\EntityFactory | $eavEntityFactory, | ||
\Magento\Eav\Model\ResourceModel\Helper | $resourceHelper, | ||
\Magento\Framework\Validator\UniversalFactory | $universalFactory, | ||
\Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
\Magento\Framework\DB\Adapter\AdapterInterface | $connection = null , |
||
\Magento\Framework\App\Config\ScopeConfigInterface | $scopeConfig = null |
||
) |
Constructor
\Magento\Framework\Data\Collection\EntityFactory | $entityFactory | |
\Psr\Log\LoggerInterface | $logger | |
\Magento\Framework\Data\Collection\Db\FetchStrategyInterface | $fetchStrategy | |
\Magento\Framework\Event\ManagerInterface | $eventManager | |
\Magento\Eav\Model\Config | $eavConfig | |
\Magento\Framework\App\ResourceConnection | $resource | |
\Magento\Eav\Model\EntityFactory | $eavEntityFactory | |
\Magento\Eav\Model\ResourceModel\Helper | $resourceHelper | |
\Magento\Framework\Validator\UniversalFactory | $universalFactory | |
\Magento\Store\Model\StoreManagerInterface | $storeManager | |
\Magento\Framework\DB\Adapter\AdapterInterface | $connection | |
\Magento\Framework\App\Config\ScopeConfigInterface | $scopeConfig | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 88 of file Collection.php.
|
protected |
|
protected |
|
protected |
Init collection and determine table names
Definition at line 124 of file Collection.php.
|
protected |
Load categories product count
Definition at line 249 of file Collection.php.
addIdFilter | ( | $categoryIds | ) |
Add Id filter
array | $categoryIds |
Definition at line 135 of file Collection.php.
addIsActiveFilter | ( | ) |
Add active category filter
Definition at line 387 of file Collection.php.
addLevelFilter | ( | $level | ) |
Add category level filter
int | string | $level |
Definition at line 447 of file Collection.php.
addNameToResult | ( | ) |
Add name attribute to result
Definition at line 402 of file Collection.php.
addNavigationMaxDepthFilter | ( | ) |
Add navigation max depth filter
Definition at line 470 of file Collection.php.
addOrderField | ( | $field | ) |
Add order field
string | $field |
Definition at line 488 of file Collection.php.
addPathFilter | ( | $regexp | ) |
Add category path filter
string | $regexp |
Definition at line 355 of file Collection.php.
addPathsFilter | ( | $paths | ) |
Add category path filter
array | string | $paths |
Definition at line 425 of file Collection.php.
addRootLevelFilter | ( | ) |
Add root category filter
Definition at line 458 of file Collection.php.
addUrlRewriteToResult | ( | ) |
Add url rewrite rules to collection
Definition at line 413 of file Collection.php.
getProductStoreId | ( | ) |
Get id of the store that we should count products on
Definition at line 209 of file Collection.php.
getProductTable | ( | ) |
Getter for _productTable
Definition at line 512 of file Collection.php.
getProductWebsiteTable | ( | ) |
Getter for _productWebsiteTable
Definition at line 499 of file Collection.php.
joinUrlRewrite | ( | ) |
Joins url rewrite rules to collection
Definition at line 366 of file Collection.php.
Load collection
bool | $printQuery | |
bool | $logQuery |
Definition at line 224 of file Collection.php.
loadProductCount | ( | $items, | |
$countRegular = true , |
|||
$countAnchor = true |
|||
) |
Load product count for specified items
array | $items | |
boolean | $countRegular | get product count for regular (non-anchor) categories |
boolean | $countAnchor | get product count for anchor categories |
Definition at line 264 of file Collection.php.
setLoadProductCount | ( | $flag | ) |
Set flag for loading product count
boolean | $flag |
Definition at line 163 of file Collection.php.
setProductStoreId | ( | $storeId | ) |
Set id of the store that we should count products on
int | $storeId |
Definition at line 198 of file Collection.php.
|
protected |
Definition at line 34 of file Collection.php.
|
protected |
Definition at line 27 of file Collection.php.
|
protected |
Definition at line 62 of file Collection.php.
|
protected |
Definition at line 48 of file Collection.php.