|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
| const | XML_PATH_PRODUCT_URL_USE_CATEGORY = 'catalog/seo/product_use_categories' |
| const | XML_PATH_USE_PRODUCT_CANONICAL_TAG = 'catalog/seo/product_canonical_tag' |
| const | XML_PATH_AUTO_GENERATE_MASK = 'catalog/fields_masks' |
Additional Inherited Members | |
Protected Member Functions inherited from AbstractHelper | |
| _getRequest () | |
| _getModuleName () | |
| _getUrl ($route, $params=[]) | |
Catalog category helper @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 18 of file Product.php.
| __construct | ( | \Magento\Framework\App\Helper\Context | $context, |
| \Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
| \Magento\Catalog\Model\Session | $catalogSession, | ||
| \Magento\Framework\View\Asset\Repository | $assetRepo, | ||
| \Magento\Framework\Registry | $coreRegistry, | ||
| \Magento\Catalog\Model\Attribute\Config | $attributeConfig, | ||
| $reindexPriceIndexerData, | |||
| $reindexProductCategoryIndexerData, | |||
| ProductRepositoryInterface | $productRepository, | ||
| CategoryRepositoryInterface | $categoryRepository | ||
| ) |
| \Magento\Framework\App\Helper\Context | $context | |
| \Magento\Store\Model\StoreManagerInterface | $storeManager | |
| \Magento\Catalog\Model\Session | $catalogSession | |
| \Magento\Framework\View\Asset\Repository | $assetRepo | |
| \Magento\Framework\Registry | $coreRegistry | |
| \Magento\Catalog\Model\Attribute\Config | $attributeConfig | |
| array | $reindexPriceIndexerData | |
| array | $reindexProductCategoryIndexerData | |
| ProductRepositoryInterface | $productRepository | |
| CategoryRepositoryInterface | $categoryRepository | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 109 of file Product.php.
| addParamsToBuyRequest | ( | $buyRequest, | |
| $params | |||
| ) |
Process $buyRequest and sets its options before saving configuration to some product item. This method is used to attach additional parameters to processed buyRequest.
$params holds parameters of what operation must be performed:
| \Magento\Framework\DataObject | array | $buyRequest | |
| \Magento\Framework\DataObject | array | $params |
Definition at line 508 of file Product.php.
| canShow | ( | $product, | |
$where = 'catalog' |
|||
| ) |
Check if a product can be shown
| ModelProduct | int | $product | |
| string | $where |
Definition at line 304 of file Product.php.
| canUseCanonicalTag | ( | $store = null | ) |
Check if <link rel="canonical"> can be used for product
| null | string | bool | int | Store | $store |
Definition at line 326 of file Product.php.
| getAttributeBackendModelByInputType | ( | $inputType | ) |
Return default attribute backend model by input type
| string | $inputType |
Definition at line 369 of file Product.php.
| getAttributeInputTypes | ( | $inputType = null | ) |
Return information array of product attribute input types Only a small number of settings returned, so we won't break anything in current data flow As soon as development process goes on we need to add there all possible settings
| string | $inputType |
Definition at line 343 of file Product.php.
| getAttributesAllowedForAutogeneration | ( | ) |
Retrieve list of attributes that allowed for autogeneration
Definition at line 581 of file Product.php.
| getAttributeSourceModelByInputType | ( | $inputType | ) |
Return default attribute source model by input type
| string | $inputType |
Definition at line 384 of file Product.php.
| getEmailToFriendUrl | ( | $product | ) |
| ModelProduct | $product |
Definition at line 274 of file Product.php.
| getFieldsAutogenerationMasks | ( | ) |
Get masks for auto generation of fields
Definition at line 571 of file Product.php.
| getFinalPrice | ( | $product | ) |
Retrieve product final price
| ModelProduct | $product |
Definition at line 211 of file Product.php.
| getImageUrl | ( | $product | ) |
Retrieve base image url
| ModelProduct | \Magento\Framework\DataObject | $product |
Definition at line 222 of file Product.php.
| getPrice | ( | $product | ) |
Retrieve product price
| ModelProduct | $product |
Definition at line 200 of file Product.php.
| getProductUrl | ( | $product | ) |
Retrieve product view page url
| int | ModelProduct | $product |
Definition at line 184 of file Product.php.
| getSkipSaleableCheck | ( | ) |
Get flag that shows if Magento has to check product to be saleable (enabled and/or inStock)
Definition at line 561 of file Product.php.
| getSmallImageUrl | ( | $product | ) |
Retrieve small image url
| ModelProduct | \Magento\Framework\DataObject | $product |
Definition at line 240 of file Product.php.
| getStatuses | ( | ) |
| getThumbnailUrl | ( | $product | ) |
Retrieve thumbnail image url
| ModelProduct | \Magento\Framework\DataObject | $product |
Definition at line 258 of file Product.php.
| initProduct | ( | $productId, | |
| $controller, | |||
$params = null |
|||
| ) |
Inits product to be used for product controller actions and layouts $params can have following data: 'category_id' - id of category to check and append to product as current. If empty (except FALSE) - will be guessed (e.g. from last visited) to load as current.
| int | $productId | |
| \Magento\Framework\App\Action\Action | $controller | |
| \Magento\Framework\DataObject | $params |
Definition at line 407 of file Product.php.
| isDataForPriceIndexerWasChanged | ( | $data | ) |
Retrieve data for price indexer update
| \Magento\Catalog\Model\Product | array | $data |
Definition at line 139 of file Product.php.
| isDataForProductCategoryIndexerWasChanged | ( | \Magento\Catalog\Model\Product | $data | ) |
Retrieve data for product category indexer update
| \Magento\Catalog\Model\Product | $data |
Definition at line 168 of file Product.php.
| prepareProductOptions | ( | $product, | |
| $buyRequest | |||
| ) |
Prepares product options by buyRequest: retrieves values and assigns them as default. Also parses and adds product management related values - e.g. qty
| ModelProduct | $product | |
| \Magento\Framework\DataObject | $buyRequest |
Definition at line 485 of file Product.php.
| setSkipSaleableCheck | ( | $skipSaleableCheck = false | ) |
Set flag that shows if Magento has to check product to be saleable (enabled and/or inStock)
For instance, during order creation in the backend admin has ability to add any products to order
| bool | $skipSaleableCheck |
Definition at line 549 of file Product.php.
|
protected |
Definition at line 46 of file Product.php.
|
protected |
Definition at line 58 of file Product.php.
|
protected |
Definition at line 65 of file Product.php.
|
protected |
Definition at line 53 of file Product.php.
|
protected |
Definition at line 41 of file Product.php.
|
protected |
Definition at line 79 of file Product.php.
|
protected |
Definition at line 72 of file Product.php.
|
protected |
Definition at line 31 of file Product.php.
|
protected |
Definition at line 36 of file Product.php.
|
protected |
Definition at line 94 of file Product.php.
|
protected |
Definition at line 89 of file Product.php.
|
protected |
Definition at line 84 of file Product.php.
| const XML_PATH_AUTO_GENERATE_MASK = 'catalog/fields_masks' |
Definition at line 24 of file Product.php.
| const XML_PATH_PRODUCT_URL_USE_CATEGORY = 'catalog/seo/product_use_categories' |
Definition at line 20 of file Product.php.
| const XML_PATH_USE_PRODUCT_CANONICAL_TAG = 'catalog/seo/product_canonical_tag' |
Definition at line 22 of file Product.php.