orders === null) { $this->orders = $this->collectionFactory->create() ->addFieldToFilter('customer_id', (int)$this->customerSession->getCustomerId()) ->setOrder('ordered_at', 'DESC'); } return $this->orders; } public function getViewUrl(int $legacyOrderId): string { return $this->getUrl('legacy_order/account/view', ['id' => $legacyOrderId]); } }