Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
QuoteShortcutButtons.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Checkout\Block;
7 
9 
15 {
19  protected $_checkoutSession;
20 
27  public function __construct(
28  Template\Context $context,
29  \Magento\Checkout\Model\Session $checkoutSession,
30  array $data = []
31  ) {
32  parent::__construct($context, false, null, $data);
33  $this->_checkoutSession = $checkoutSession;
34  }
35 
41  protected function _beforeToHtml()
42  {
43  $this->_eventManager->dispatch(
44  'shortcut_buttons_container',
45  [
46  'container' => $this,
47  'is_catalog_product' => $this->_isCatalogProduct,
48  'or_position' => $this->_orPosition,
49  'checkout_session' => $this->_checkoutSession
50  ]
51  );
52  return $this;
53  }
54 }
__construct(Template\Context $context, \Magento\Checkout\Model\Session $checkoutSession, array $data=[])