Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Popup Class Reference
Inheritance diagram for Popup:
Action AbstractAction ActionInterface

Public Member Functions

 __construct (\Magento\Framework\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry, \Magento\Shipping\Model\InfoFactory $shippingInfoFactory, \Magento\Sales\Model\OrderFactory $orderFactory)
 
 execute ()
 
- Public Member Functions inherited from Action
 __construct (Context $context)
 
 dispatch (RequestInterface $request)
 
 getActionFlag ()
 
- Public Member Functions inherited from AbstractAction
 __construct (Context $context)
 
 dispatch (RequestInterface $request)
 
 getRequest ()
 
 getResponse ()
 

Protected Attributes

 $_coreRegistry
 
 $_shippingInfoFactory
 
 $_orderFactory
 
- Protected Attributes inherited from Action
 $_objectManager
 
 $_sessionNamespace
 
 $_eventManager
 
 $_actionFlag
 
 $_redirect
 
 $_view
 
 $_url
 
 $messageManager
 
- Protected Attributes inherited from AbstractAction
 $_request
 
 $_response
 
 $resultRedirectFactory
 
 $resultFactory
 

Additional Inherited Members

- Data Fields inherited from ActionInterface
const FLAG_NO_DISPATCH = 'no-dispatch'
 
const FLAG_NO_POST_DISPATCH = 'no-postDispatch'
 
const FLAG_NO_DISPATCH_BLOCK_EVENT = 'no-beforeGenerateLayoutBlocksDispatch'
 
const PARAM_NAME_BASE64_URL = 'r64'
 
const PARAM_NAME_URL_ENCODED = 'uenc'
 
- Protected Member Functions inherited from Action
 _forward ($action, $controller=null, $module=null, array $params=null)
 
 _redirect ($path, $arguments=[])
 

Detailed Description

Definition at line 11 of file Popup.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Framework\App\Action\Context  $context,
\Magento\Framework\Registry  $coreRegistry,
\Magento\Shipping\Model\InfoFactory  $shippingInfoFactory,
\Magento\Sales\Model\OrderFactory  $orderFactory 
)
Parameters
\Magento\Framework\App\Action\Context$context
\Magento\Framework\Registry$coreRegistry
\Magento\Shipping\Model\InfoFactory$shippingInfoFactory
\Magento\Sales\Model\OrderFactory$orderFactory

Definition at line 36 of file Popup.php.

41  {
42  $this->_coreRegistry = $coreRegistry;
43  $this->_shippingInfoFactory = $shippingInfoFactory;
44  $this->_orderFactory = $orderFactory;
45  parent::__construct($context);
46  }

Member Function Documentation

◆ execute()

execute ( )

Popup action Shows tracking info if it's present, otherwise redirects to 404

Returns
void
Exceptions
NotFoundExceptionGet associated grouped products grid popup
Returns
\Magento\Framework\View\Result\Layout

Implements ActionInterface.

Definition at line 55 of file Popup.php.

56  {
57  $shippingInfoModel = $this->_shippingInfoFactory->create()->loadByHash($this->getRequest()->getParam('hash'));
58  $this->_coreRegistry->register('current_shipping_info', $shippingInfoModel);
59  if (count($shippingInfoModel->getTrackingInfo()) == 0) {
60  throw new NotFoundException(__('Page not found.'));
61  }
62  $this->_view->loadLayout();
63  $this->_view->getPage()->getConfig()->getTitle()->set(__('Tracking Information'));
64  $this->_view->renderLayout();
65  }
__()
Definition: __.php:13

Field Documentation

◆ $_coreRegistry

$_coreRegistry
protected

Definition at line 18 of file Popup.php.

◆ $_orderFactory

$_orderFactory
protected

Definition at line 28 of file Popup.php.

◆ $_shippingInfoFactory

$_shippingInfoFactory
protected

Definition at line 23 of file Popup.php.


The documentation for this class was generated from the following file: