/** * Update grid collection according to chosen order * * @param \Magento\Sales\Model\ResourceModel\Transaction\Grid\Collection $argument * @return \Magento\Sales\Model\ResourceModel\Transaction\Grid\Collection */ public function update($argument) { $order = $this->registryManager->registry('current_order'); if ($order) { $argument->setOrderFilter($order->getId()); } $argument->addOrderInformation(['increment_id']); return $argument; }
/** * Update grid collection according to chosen transaction * * @param \Magento\Sales\Model\ResourceModel\Transaction\Grid\Collection $argument * @return \Magento\Sales\Model\ResourceModel\Transaction\Grid\Collection */ public function update($argument) { $argument->addParentIdFilter($this->registryManager->registry('current_transaction')->getId()); return $argument; }