/** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Sales\Helper\Admin $adminHelper * @param array $data */ public function __construct(\ShipperHQ\Shipper\Helper\Data $shipperDataHelper, \ShipperHQ\Shipper\Helper\CarrierGroup $carrierGroupHelper, \Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, \Magento\Sales\Helper\Admin $adminHelper, array $data = []) { $this->shipperDataHelper = $shipperDataHelper; $this->carrierGroupHelper = $carrierGroupHelper; $this->_adminHelper = $adminHelper; $this->_coreRegistry = $registry; parent::__construct($context, $registry, $adminHelper, $data); }
/** * Retrieve required options from parent * * @return void */ protected function _beforeToHtml() { if (!$this->getParentBlock()) { throw new \Magento\Framework\Model\Exception(__('Please correct the parent block for this block.')); } $this->setOrder($this->getParentBlock()->getOrder()); foreach ($this->getParentBlock()->getOrderInfoData() as $k => $v) { $this->setDataUsingMethod($k, $v); } parent::_beforeToHtml(); }
/** * Retrieve required options from parent * * @return void * @throws \Magento\Framework\Exception\LocalizedException */ protected function _beforeToHtml() { if (!$this->getParentBlock()) { throw new \Magento\Framework\Exception\LocalizedException(__('Please correct the parent block for this block.')); } $this->setOrder($this->getParentBlock()->getOrder()); $this->setSource($this->getParentBlock()->getSource()); $this->setCurrency($this->getParentBlock()->getOrder()->getOrderCurrency()); foreach ($this->getParentBlock()->getOrderTotalbarData() as $v) { $this->addTotal($v[0], $v[1], $v[2]); } parent::_beforeToHtml(); }
/** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Sales\Helper\Admin $adminHelper * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory * @param array $data */ public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, \Magento\Sales\Helper\Admin $adminHelper, \Magento\Shipping\Model\CarrierFactory $carrierFactory, array $data = []) { $this->_carrierFactory = $carrierFactory; parent::__construct($context, $registry, $adminHelper, $data); }
/** * @return \Magento\Framework\View\Element\AbstractBlock */ protected function _prepareLayout() { $this->addChild('items', 'Magento\\Shipping\\Block\\Adminhtml\\Create\\Items'); return parent::_prepareLayout(); }
public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, \Magento\Sales\Helper\Admin $adminHelper, ObjectManagerInterface $interface, array $data) { $this->_objectManager = $interface; parent::__construct($context, $registry, $adminHelper, $data); }