123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Shipping\Block\Adminhtml\Create;
- /**
- * Adminhtml shipment create form
- *
- * @api
- * @since 100.0.2
- */
- class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
- {
- /**
- * Retrieve invoice order
- *
- * @return \Magento\Sales\Model\Order
- */
- public function getOrder()
- {
- return $this->getShipment()->getOrder();
- }
- /**
- * Retrieve source
- *
- * @return \Magento\Sales\Model\Order\Shipment
- */
- public function getSource()
- {
- return $this->getShipment();
- }
- /**
- * Retrieve shipment model instance
- *
- * @return \Magento\Sales\Model\Order\Shipment
- */
- public function getShipment()
- {
- return $this->_coreRegistry->registry('current_shipment');
- }
- /**
- * @return \Magento\Framework\View\Element\AbstractBlock
- */
- protected function _prepareLayout()
- {
- $this->addChild('items', \Magento\Shipping\Block\Adminhtml\Create\Items::class);
- return parent::_prepareLayout();
- }
- /**
- * @return string
- */
- public function getPaymentHtml()
- {
- return $this->getChildHtml('order_payment');
- }
- /**
- * @return string
- */
- public function getItemsHtml()
- {
- return $this->getChildHtml('order_items');
- }
- /**
- * @return string
- */
- public function getSaveUrl()
- {
- return $this->getUrl('*/*/save', ['order_id' => $this->getShipment()->getOrderId()]);
- }
- }
|