57 parent::__construct($context,
$data);
58 $this->_invoiceCollectionFactory = $invoiceCollectionFactory;
59 $this->_memoCollectionFactory = $memoCollectionFactory;
60 $this->_shipmentCollectionFactory = $shipmentCollectionFactory;
72 $this->_commentCollection =
null;
95 if ($this->_commentCollection ===
null) {
98 $this->_commentCollection = $this->_invoiceCollectionFactory->create();
100 $this->_commentCollection = $this->_memoCollectionFactory->create();
102 $this->_commentCollection = $this->_shipmentCollectionFactory->create();
104 throw new \Magento\Framework\Exception\LocalizedException(
__(
'We found an invalid entity model.'));
107 $this->_commentCollection->setParentFilter(
$entity)->setCreatedAtOrder()->addVisibleOnFrontFilter();
elseif(isset( $params[ 'redirect_parent']))