/** * Retrieves document data for a specific order and adds it to the entries. * * @param array $options * * @throws \Sulu\Bundle\AdminBundle\Widgets\WidgetParameterException */ protected function fetchDocumentData($options) { $documents = $this->dependencyManager->getDocuments($options['orderId'], $options['locale']); if (!empty($documents)) { /* @var SalesDocument $document */ foreach ($documents as $document) { $data = $document->getSalesDocumentData(); parent::addEntry($this->getProperty($data, 'id'), $this->getProperty($data, 'number'), $this->getProperty($data, 'icon'), $this->getProperty($data, 'date'), parent::getRoute($data['id'], $data['type'], 'details'), $this->getProperty($data, 'pdfBaseUrl'), $this->getProperty($data, 'translationKey')); } } }
/** * Retrieves order data * * @param $options * * @throws \Sulu\Bundle\AdminBundle\Widgets\WidgetParameterException */ protected function getShipppingData($options) { parent::addEntry($options['id'], $options['number'], 'fa-truck', new DateTime($options['date']), parent::getRoute($options['id'], 'shipping', 'details'), null, 'salesshipping.shipping'); }