|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (\Magento\Framework\App\Helper\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, \Magento\Framework\View\LayoutFactory $layoutFactory, \Magento\GiftMessage\Model\MessageFactory $giftMessageFactory, \Magento\Framework\Escaper $escaper, $skipMessageCheck=[]) | |
| getInline ($type, \Magento\Framework\DataObject $entity, $dontDisplayContainer=false) | |
| isMessagesAllowed ($type, \Magento\Framework\DataObject $entity, $store=null) | |
| getEscapedGiftMessage (\Magento\Framework\DataObject $entity) | |
| getGiftMessageForEntity (\Magento\Framework\DataObject $entity) | |
| getCached ($key) | |
| isCached ($key) | |
| setCached ($key, $value) | |
| getAvailableForQuoteItems ($quote, $store=null) | |
| getAvailableForAddressItems ($items, $store=null) | |
| getGiftMessage ($messageId=null) | |
Public Member Functions inherited from AbstractHelper | |
| __construct (Context $context) | |
| isModuleOutputEnabled ($moduleName=null) | |
Data Fields | |
| const | XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ITEMS = 'sales/gift_options/allow_items' |
| const | XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ORDER = 'sales/gift_options/allow_order' |
Protected Member Functions | |
| skipPage ($pageType) | |
| _getDependenceFromStoreConfig ($productConfig, $store=null) | |
Protected Member Functions inherited from AbstractHelper | |
| _getRequest () | |
| _getModuleName () | |
| _getUrl ($route, $params=[]) | |
Protected Attributes | |
| $_nextId = 0 | |
| $_innerCache = [] | |
| $productRepository | |
| $_layoutFactory | |
| $_giftMessageFactory | |
| $_escaper | |
| $skipMessageCheck = [] | |
Protected Attributes inherited from AbstractHelper | |
| $_moduleName | |
| $_request | |
| $_moduleManager | |
| $_logger | |
| $_urlBuilder | |
| $_httpHeader | |
| $_eventManager | |
| $_remoteAddress | |
| $urlEncoder | |
| $urlDecoder | |
| $scopeConfig | |
| $_cacheConfig | |
Gift Message helper @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 15 of file Message.php.
| __construct | ( | \Magento\Framework\App\Helper\Context | $context, |
| \Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
| \Magento\Catalog\Api\ProductRepositoryInterface | $productRepository, | ||
| \Magento\Framework\View\LayoutFactory | $layoutFactory, | ||
| \Magento\GiftMessage\Model\MessageFactory | $giftMessageFactory, | ||
| \Magento\Framework\Escaper | $escaper, | ||
$skipMessageCheck = [] |
|||
| ) |
| \Magento\Framework\App\Helper\Context | $context | |
| \Magento\Store\Model\StoreManagerInterface | $storeManager | |
| \Magento\Catalog\Api\ProductRepositoryInterface | $productRepository | |
| \Magento\Framework\View\LayoutFactory | $layoutFactory | |
| \Magento\GiftMessage\Model\MessageFactory | $giftMessageFactory | |
| \Magento\Framework\Escaper | $escaper | |
| array | $skipMessageCheck | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 81 of file Message.php.
|
protected |
Check availablity of gift messages from store config if flag eq 2.
| bool | $productConfig | |
| \Magento\Store\Model\Store | int | null | $store |
Definition at line 200 of file Message.php.
| getAvailableForAddressItems | ( | $items, | |
$store = null |
|||
| ) |
Check availability for multishipping checkout items
| array | $items | |
| \Magento\Store\Model\Store | int | null | $store |
Definition at line 310 of file Message.php.
| getAvailableForQuoteItems | ( | $quote, | |
$store = null |
|||
| ) |
Check availability for onepage checkout items
| array | $quote | |
| \Magento\Store\Model\Store | int | null | $store |
Definition at line 292 of file Message.php.
| getCached | ( | $key | ) |
Retrieve internal cached data with specified key.
If cached data not found return null.
| string | $key |
Definition at line 252 of file Message.php.
| getEscapedGiftMessage | ( | \Magento\Framework\DataObject | $entity | ) |
Retrieve escaped and preformated gift message text for specified entity
| \Magento\Framework\DataObject | $entity |
Definition at line 220 of file Message.php.
| getGiftMessage | ( | $messageId = null | ) |
Retrieve gift message with specified id
| int | $messageId |
Definition at line 326 of file Message.php.
| getGiftMessageForEntity | ( | \Magento\Framework\DataObject | $entity | ) |
Retrieve gift message for entity. If message not exists return null
| \Magento\Framework\DataObject | $entity |
Definition at line 235 of file Message.php.
| getInline | ( | $type, | |
| \Magento\Framework\DataObject | $entity, | ||
$dontDisplayContainer = false |
|||
| ) |
Retrieve inline giftmessage edit form for specified entity
| string | $type | |
| \Magento\Framework\DataObject | $entity | |
| bool | $dontDisplayContainer |
Definition at line 110 of file Message.php.
| isCached | ( | $key | ) |
Check availability for internal cached data with specified key
| string | $key |
Definition at line 266 of file Message.php.
| isMessagesAllowed | ( | $type, | |
| \Magento\Framework\DataObject | $entity, | ||
$store = null |
|||
| ) |
Check if giftmessages is allowed for specified entity.
| string | $type | |
| \Magento\Framework\DataObject | $entity | |
| \Magento\Store\Model\Store | int | null | $store |
Definition at line 140 of file Message.php.
| setCached | ( | $key, | |
| $value | |||
| ) |
Set internal cache data with specified key
| string | $key | |
| mixed | $value |
Definition at line 278 of file Message.php.
|
protected |
|
protected |
Definition at line 57 of file Message.php.
|
protected |
Definition at line 52 of file Message.php.
|
protected |
Definition at line 37 of file Message.php.
|
protected |
Definition at line 47 of file Message.php.
|
protected |
Definition at line 30 of file Message.php.
|
protected |
Definition at line 42 of file Message.php.
|
protected |
Definition at line 64 of file Message.php.
| const XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ITEMS = 'sales/gift_options/allow_items' |
Gift messages allow section in configuration
Definition at line 21 of file Message.php.
| const XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ORDER = 'sales/gift_options/allow_order' |
Definition at line 23 of file Message.php.