Persistent Observer
@SuppressWarnings(PHPMD.LongVariable)
Definition at line 13 of file Observer.php.
◆ __construct()
Constructor
- Parameters
-
\Magento\Persistent\Helper\Session | $persistentSession | |
\Magento\Framework\UrlInterface | $url | |
\Magento\Framework\View\LayoutInterface | $layout | |
\Magento\Framework\Escaper | $escaper | |
\Magento\Customer\Helper\View | $customerViewHelper | |
\Magento\Customer\Api\CustomerRepositoryInterface | $customerRepository | |
Definition at line 65 of file Observer.php.
75 $this->_layout = $layout;
76 $this->_escaper = $escaper;
77 $this->_customerViewHelper = $customerViewHelper;
◆ _applyAccountLinksPersistentData()
_applyAccountLinksPersistentData |
( |
| ) |
|
|
protected |
Emulate 'account links' block with persistent data
- Returns
- void
Definition at line 104 of file Observer.php.
106 if (!$this->_layout->getBlock(
'header.additional')) {
107 $this->_layout->addBlock(\
Magento\Persistent\Block\Header\Additional::class,
'header.additional');
◆ emulateWelcomeBlock()
emulateWelcomeBlock |
( |
|
$block | ) |
|
Emulate 'welcome' block with persistent data
- Parameters
-
\Magento\Framework\View\Element\AbstractBlock | $block | |
- Returns
- $this
Definition at line 87 of file Observer.php.
89 $customerName = $this->_customerViewHelper->getCustomerName(
90 $this->customerRepository->getById($this->_persistentSession->getSession()->getCustomerId())
_applyAccountLinksPersistentData()
◆ $_customerViewHelper
◆ $_escaper
◆ $_layout
◆ $_persistentSession
◆ $_url
◆ $customerRepository
The documentation for this class was generated from the following file: