18 use Magento\Sales\Model\ResourceModel\Order\Shipment\CollectionFactory;
56 parent::__construct($context,
$filter);
73 $labelContent =
$shipment->getShippingLabel();
75 $labelsContent[] = $labelContent;
80 if (!empty($labelsContent)) {
81 $outputPdf = $this->labelGenerator->combineLabelsPdf($labelsContent);
82 return $this->fileFactory->create(
90 $this->messageManager->addError(
__(
'There are no shipping labels related to selected shipments.'));
91 return $this->resultRedirectFactory->create()->setPath(
'sales/shipment/');
massAction(AbstractCollection $collection)
__construct(Context $context, Filter $filter, FileFactory $fileFactory, LabelGenerator $labelGenerator, CollectionFactory $collectionFactory)
foreach($order->getItems() as $orderItem) $shipment