/** * Enter description here... * * @return Purchased */ public function getLinks() { $this->_purchased = $this->_purchasedFactory->create()->load($this->getItem()->getOrder()->getId(), 'order_id'); $purchasedLinks = $this->_itemsFactory->create()->addFieldToFilter('order_item_id', $this->getItem()->getOrderItem()->getId()); $this->_purchased->setPurchasedItems($purchasedLinks); return $this->_purchased; }
/** * @return \Magento\Downloadable\Model\Link\Purchased */ protected function _createPurchasedModel() { return $this->_purchasedFactory->create(); }