diff --git a/Ui/Column/DeliveryTimesPriority.php b/Ui/Column/DeliveryTimesPriority.php index 27c6358..3edf33d 100644 --- a/Ui/Column/DeliveryTimesPriority.php +++ b/Ui/Column/DeliveryTimesPriority.php @@ -5,13 +5,11 @@ use DHLParcel\Shipping\Helper\Data; use DHLParcel\Shipping\Model\Service\DeliveryTimes as DeliveryTimesService; use Magento\Sales\Api\OrderRepositoryInterface; -use Magento\Framework\Controller\ResultFactory; class DeliveryTimesPriority extends \Magento\Ui\Component\Listing\Columns\Column { protected $deliveryTimesService; protected $orderRepository; - protected $resultFactory; protected $helper; public function __construct( @@ -19,14 +17,12 @@ public function __construct( \Magento\Framework\View\Element\UiComponentFactory $uiComponentFactory, DeliveryTimesService $deliveryTimesService, OrderRepositoryInterface $orderRepository, - ResultFactory $resultFactory, Data $helper, array $components = [], array $data = [] ) { $this->deliveryTimesService = $deliveryTimesService; $this->orderRepository = $orderRepository; - $this->resultFactory = $resultFactory; $this->helper = $helper; parent::__construct($context, $uiComponentFactory, $components, $data); } @@ -87,9 +83,9 @@ protected function loadTemplate($timeSelection, $isSDD = false) 'shipping_advice_class' => $shippingAdviceClass, ]; - return $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_LAYOUT) - ->getLayout() - ->createBlock('Magento\Framework\View\Element\Template', 'deliverytimes.column.' . mt_rand()) // phpcs:ignore + return $this->context + ->getPageLayout() + ->createBlock(\Magento\Backend\Block\Template::class, 'deliverytimes.column.' . mt_rand()) // phpcs:ignore ->setData($view) ->setTemplate('DHLParcel_Shipping::deliverytimes.column.phtml') ->setArea(\Magento\Framework\App\Area::AREA_ADMINHTML)