Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (Context $context, PostHelper $postDataHelper, Resolver $layerResolver, CategoryRepositoryInterface $categoryRepository, Data $urlHelper, array $data=[]) | |
getLayer () | |
getLoadedProductCollection () | |
getMode () | |
getToolbarBlock () | |
getAdditionalHtml () | |
getToolbarHtml () | |
setCollection ($collection) | |
addAttribute ($code) | |
getPriceBlockTemplate () | |
prepareSortableFieldsByCategory ($category) | |
getIdentities () | |
getAddToCartPostParams (Product $product) | |
getProductPrice (Product $product) | |
![]() | |
__construct (\Magento\Catalog\Block\Product\Context $context, array $data=[]) | |
getAddToCartUrl ($product, $additional=[]) | |
getSubmitUrl ($product, $additional=[]) | |
getAddToWishlistParams ($product) | |
getAddToCompareUrl () | |
getMinimalQty ($product) | |
getReviewsSummaryHtml (\Magento\Catalog\Model\Product $product, $templateType=false, $displayIfNoReviews=false) | |
getProduct () | |
getProductUrl ($product, $additional=[]) | |
hasProductUrl ($product) | |
getColumnCount () | |
addColumnCountLayoutDepend ($pageLayout, $columnCount) | |
removeColumnCountLayoutDepend ($pageLayout) | |
getColumnCountLayoutDepend ($pageLayout) | |
getPageLayout () | |
getCanShowProductPrice ($product) | |
displayProductStockStatus () | |
getRandomString ($length, $chars=null) | |
getProductPrice (\Magento\Catalog\Model\Product $product) | |
isRedirectToCartEnabled () | |
getProductDetailsHtml (\Magento\Catalog\Model\Product $product) | |
getDetailsRenderer ($type=null) | |
getImage ($product, $imageId, $attributes=[]) | |
![]() | |
__construct (Template\Context $context, array $data=[]) | |
setTemplateContext ($templateContext) | |
getTemplate () | |
setTemplate ($template) | |
getTemplateFile ($template=null) | |
getArea () | |
assign ($key, $value=null) | |
fetchView ($fileName) | |
getBaseUrl () | |
getObjectData (\Magento\Framework\DataObject $object, $key) | |
getCacheKeyInfo () | |
![]() | |
__construct (\Magento\Framework\View\Element\Context $context, array $data=[]) | |
getJsLayout () | |
getRequest () | |
getParentBlock () | |
setLayout (\Magento\Framework\View\LayoutInterface $layout) | |
getLayout () | |
setNameInLayout ($name) | |
getChildNames () | |
setAttribute ($name, $value=null) | |
setChild ($alias, $block) | |
addChild ($alias, $block, $data=[]) | |
unsetChild ($alias) | |
unsetCallChild ($alias, $callback, $result, $params) | |
unsetChildren () | |
getChildBlock ($alias) | |
getChildHtml ($alias='', $useCache=true) | |
getChildChildHtml ($alias, $childChildAlias='', $useCache=true) | |
getBlockHtml ($name) | |
insert ($element, $siblingName=0, $after=true, $alias='') | |
append ($element, $alias='') | |
getGroupChildNames ($groupName) | |
getChildData ($alias, $key='') | |
getUiId ($arg1=null, $arg2=null, $arg3=null, $arg4=null, $arg5=null) | |
getJsId ($arg1=null, $arg2=null, $arg3=null, $arg4=null, $arg5=null) | |
getUrl ($route='', $params=[]) | |
getViewFileUrl ($fileId, array $params=[]) | |
formatDate ( $date=null, $format=\IntlDateFormatter::SHORT, $showTime=false, $timezone=null) | |
formatTime ( $time=null, $format=\IntlDateFormatter::SHORT, $showDate=false) | |
getModuleName () | |
escapeHtml ($data, $allowedTags=null) | |
escapeJs ($string) | |
escapeHtmlAttr ($string, $escapeSingleQuote=true) | |
escapeCss ($string) | |
stripTags ($data, $allowableTags=null, $allowHtmlEntities=false) | |
escapeUrl ($string) | |
escapeXssInUrl ($data) | |
escapeQuote ($data, $addSlashes=false) | |
escapeJsQuote ($data, $quote='\'') | |
getNameInLayout () | |
getCacheKeyInfo () | |
getCacheKey () | |
getVar ($name, $module=null) | |
isScopePrivate () | |
![]() | |
__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) | |
![]() | |
toHtml () | |
Protected Member Functions | |
_getProductCollection () | |
_beforeToHtml () | |
_getConfig () | |
getPriceRender () | |
![]() | |
_addProductAttributesAndPrices (\Magento\Catalog\Model\ResourceModel\Product\Collection $collection) | |
getDetailsRendererList () | |
![]() | |
_construct () | |
_toHtml () | |
getRootDirectory () | |
getMediaDirectory () | |
![]() | |
_construct () | |
_prepareLayout () | |
_beforeToHtml () | |
_afterToHtml ($html) | |
_toHtml () | |
_getNotFoundUrl ($route='', $params=['_direct'=> 'core/index/notFound']) | |
getCacheTags () | |
getCacheLifetime () | |
_loadCache () | |
_saveCache ($data) | |
_getSidPlaceholder ($cacheKey=null) | |
![]() | |
_getData ($key) | |
_underscore ($name) | |
Additional Inherited Members | |
![]() | |
static | extractModuleName ($className) |
![]() | |
const | XML_PATH_TEMPLATE_ALLOW_SYMLINK = 'dev/template/allow_symlink' |
![]() | |
const | CACHE_GROUP = \Magento\Framework\App\Cache\Type\Block::TYPE_IDENTIFIER |
const | CACHE_KEY_PREFIX = 'BLOCK_' |
![]() | |
static | $_underscoreCache = [] |
Product list @api @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 33 of file ListProduct.php.
__construct | ( | Context | $context, |
PostHelper | $postDataHelper, | ||
Resolver | $layerResolver, | ||
CategoryRepositoryInterface | $categoryRepository, | ||
Data | $urlHelper, | ||
array | $data = [] |
||
) |
Context | $context | |
PostHelper | $postDataHelper | |
Resolver | $layerResolver | |
CategoryRepositoryInterface | $categoryRepository | |
Data | $urlHelper | |
array | $data |
Definition at line 79 of file ListProduct.php.
|
protected |
Need use as _prepareLayout - but problem in declaring collection from another block (was problem with search result)
Definition at line 185 of file ListProduct.php.
|
protected |
Retrieve Catalog Config object
Definition at line 297 of file ListProduct.php.
|
protected |
Retrieve loaded product collection
The goal of this method is to choose whether the existing collection should be returned or a new one should be initialized.
It is not just a caching logic, but also is a real logical check because there are two ways how collection may be stored inside the block:
And this method will return collection anyway, even when it did not pass externally and therefore isn't cached yet
Definition at line 113 of file ListProduct.php.
addAttribute | ( | $code | ) |
array | string | integer | Element | $code |
Definition at line 278 of file ListProduct.php.
getAdditionalHtml | ( | ) |
Retrieve additional blocks html
Definition at line 249 of file ListProduct.php.
getAddToCartPostParams | ( | Product | $product | ) |
Get post parameters
Product | $product |
Definition at line 361 of file ListProduct.php.
getIdentities | ( | ) |
Return identifiers for produced content
Implements IdentityInterface.
Definition at line 334 of file ListProduct.php.
getLayer | ( | ) |
Get catalog layer model
Definition at line 127 of file ListProduct.php.
getLoadedProductCollection | ( | ) |
Retrieve loaded category collection
Definition at line 137 of file ListProduct.php.
getMode | ( | ) |
Retrieve current view mode
Definition at line 147 of file ListProduct.php.
getPriceBlockTemplate | ( | ) |
|
protected |
Specifies that price rendering should be done for the list of products i.e. rendering happens in the scope of product list, but not single product
Definition at line 404 of file ListProduct.php.
getProductPrice | ( | Product | $product | ) |
Product | $product |
Definition at line 377 of file ListProduct.php.
getToolbarBlock | ( | ) |
Retrieve Toolbar block from layout or a default Toolbar
Definition at line 215 of file ListProduct.php.
getToolbarHtml | ( | ) |
Retrieve list toolbar HTML
Definition at line 259 of file ListProduct.php.
prepareSortableFieldsByCategory | ( | $category | ) |
Prepare Sort By fields from Category Data
Category | $category |
Definition at line 308 of file ListProduct.php.
setCollection | ( | $collection | ) |
AbstractCollection | $collection |
Definition at line 268 of file ListProduct.php.
|
protected |
Definition at line 54 of file ListProduct.php.
|
protected |
Definition at line 40 of file ListProduct.php.
|
protected |
Definition at line 59 of file ListProduct.php.
|
protected |
Definition at line 47 of file ListProduct.php.
|
protected |
Definition at line 69 of file ListProduct.php.
|
protected |
Definition at line 64 of file ListProduct.php.