public function displayOrderList(TranslatorDataCollection $collection, OutputInterface $output) { if (0 === $collection->count()) { return $output->writeln('<info>Nenhum pedido para exibir</info>'); } return $this->displayTableResults($output, $collection->toArray(), ['merchant', 'orderNumber', 'acceptedOffer', 'orderDate', 'customer', 'billingAddress', 'quantity', 'freight', 'total'], 49, true); }
public function translatorFetch($offset = 0, $limit = 50, array $parameters = []) { $dataCollection = new TranslatorDataCollection(); $collection = $this->fetch($offset, $limit, $parameters); if (0 < $collection->count()) { foreach ($collection as $entity) { $dataCollection->add($this->factoryTranslatorByNative($entity)->translateTo()); } } return $dataCollection; }