Retrieves order data

@param $options
@throws \Sulu\Bundle\AdminBundle\Widgets\WidgetParameterException
189456
protected function getShipppingData($options)
    {
        parent::addEntry(
            $options['id'],
            $options['number'],
            'shipping',
            new DateTime($options['date']),
            parent::getRoute($options['id'], 'shipping', 'details'),
            Shipping::$pdfBaseUrl
        );
    }
285549
public function getQuantity(array $options, $type = null)
    {
        $options += array('order_id' => 0);

        $result = array(
            'total' => 0,
            'sku' => array()
        );

        foreach ((array) $this->getList($options) as $item) {
            $result['total'] += (int) $item['quantity'];
            $result['sku'][$item['sku']] = (int) $item['quantity'];
        }

        if (isset($type)) {
            return $result[$type];
        }

        return $result;
    }
1248891
public function getPk($options = '')
    {
        if (!empty($this->pk)) {
            $pk = $this->pk;
        } else {
            $pk = $this->getTableInfo(is_array($options) ? $options['table'] : $options, 'pk');
        }
        return $pk;
    }
882550
public function getData($order = self::SORT_DESC)
    {
        return array(
            'items' => array_map(
                function (Item $item) {
                    /*
                     * @var Item $item
                     */
                    return $item->toArray();
                },
                array_values($this->getItems($order))
            ),
        );
    }
1346416
private function getValues(array $options)
    {
        $valuesCallback = $options['values_callback'];
        $values = $valuesCallback();

        if (!is_array($values) && !$values instanceof \Traversable) {
            throw new WidgetException(
                sprintf('Values callback must return array or instance of \Traversable, "%s" provided.', gettype($values))
            );
        }

        return $values;
    }
533521
public function save(array $options = array())
    {
        $result = false;
        
        if ($this->pricelistId) {
            $result = parent::save($options);
            $order = Order::find($this->id);
            $order->pricelists()->attach($this->pricelistId);
        } else {
            throw new Exception('pricelist_id not set.');
        }
        
        return $result;
    }
593020
public function getData(Options $options = null)
    {
        if ($options === null) {
            // Take store global/default options
            $options = $this->store->getOptions();
        }

        // Get unformatted data when using xml writer
        $options->getHydrationOptions()->disableFormatters();

        $data = $this->store->getData($options);
        $bt = $this->options['body_tag'];
        $encoding = $this->options['encoding'];
        $xml = new SimpleXMLElement("<?xml version=\"1.0\" encoding=\"$encoding\" ?><$bt></$bt>");

        $now = new DateTime();
        $d = [
            'success' => true,
            'timestamp' => $now->format(DateTime::W3C),
            'total' => $data->getTotalRows(),
            'start' => $data->getSource()->getOptions()->getOffset(),
            'limit' => $data->getSource()->getOptions()->getLimit(),
            'data' => $data->toArray(),
        ];

        if ($this->options['debug']) {
            $d['query'] = $data->getSource()->getQueryString();
        }
        $this->createXmlNode($d, $xml);

        $string = $xml->asXML();
        if ($string === false) {
            throw new Exception\RuntimeException(__METHOD__ . ' XML creation failed.');
        }

        return (string) $string;
    }
1057675
public function get(array $options = [])
    {
        $pagination = '';

        if (isset($options['page']) && is_int($options['page'])) {
            $pagination = '?page='.$options['page'];
        }

        if (isset($options['key'])) {
            return $this->client->get('plugin-licenses/'.$options['key'].$pagination);
        }

        return $this->client->get('plugin-licenses'.$pagination);
    }
1147372
public function complete($options = [])
    {
        $id = Arr::get($options, 'collection_id');

        $response = $this->gateway->commit('get', $this->gateway->buildUrlFromString('collections/notifications').'/'.$id);

        if (!$response->success()) {
            return $response;
        }

        $responseData = $response->data();

        $orderId = Arr::get($responseData, 'merchant_order_id');

        return $this->gateway->commit('get', $this->gateway->buildUrlFromString('merchant_orders').'/'.$orderId);
    }
536960
public function getData($options)
    {
        $this->checkRequiredParameters($options, [$this->optionsIdKey]);

        $transitions = $this->transitionResolver->getTransitions(
            $this->transitionKey,
            $options[$this->optionsIdKey]
        );

        /** @var TransitionResultInterface $transition */
        if (isset($transitions['previous'])) {
            foreach ($transitions['previous'] as $transition) {
                $this->addTransitionToEntries($transition);
            }
        }

        /** @var TransitionResultInterface $transition */
        $transition = $transitions['current'];
        $this->addTransitionToEntries($transition);

        if (isset($transitions['following'])) {
            /** @var TransitionResultInterface $transition */
            foreach ($transitions['following'] as $transition) {
                $this->addTransitionToEntries($transition);
            }
        }

        return parent::serializeData();
    }
1000504
public function getList(array $options)
    {
        $result = null;
        $this->hook->attach('translation.entity.list.before', $options, $result, $this);

        if (isset($result)) {
            return (array) $result;
        }

        $table = $this->getTable($options['entity']);
        $sql = "SELECT * FROM `$table` WHERE {$options['entity']}_id = ?";

        $conditions = array($options['entity_id']);

        if (isset($options['language'])) {
            $sql .= ' AND language = ?';
            $conditions[] = $options['language'];
        }

        $result = $this->db->fetchAll($sql, $conditions);
        $this->hook->attach('translation.entity.list.after', $options, $result, $this);
        return (array) $result;
    }
733657
public function createOrder(array $options)
    {
        $pay = new Order($this->config->get());
        return $pay->create($options);
    }
707763
public function getLists(array $options = array())
    {

        $uri = $this->buildUserResourceUri('lists');
        $response = $this->makeAuthenticatedApiRequest($uri, $options);

        return $response->lists;

    }
301538
public function getData(array $options)
    {
        $provider = $this->getProvider();

        $ownerDetails = $provider->getResourceOwner($this->accessToken);

        return new Result([
            'externalId' => $ownerDetails->getId(),
            'name'       => trim($ownerDetails->getFirstname() . ' ' . $ownerDetails->getLastname()),
            'profileUrl' => $ownerDetails->getUrl(),
            'photoUrl'   => $ownerDetails->getImageurl()
        ]);
    }
541509
public function findBy(array $wheres, array $options = [])
    {
        $query = $this->getSqlObject()->select();

        $this->setColumns($query, $options);

        $wheres = $this->addJoins($query, $wheres, $options);

        $this->addWheres($query, $wheres, $options);

        if (Arr::get($options, 'order')) {
            $this->setOrder($query, $options['order']);
        }

        return $this->executeAndGetResultsAsEntity($query);
    }
524536
public static function getList(array $options = array())
    {
        $api = new Api\GetService();
        $result = $api->doRequest();
        $paymentMethods = self::reorderOutput($result);

        if (isset($options['country'])) {
            $paymentMethods = self::filterCountry($paymentMethods, $options['country']);
        }

        return $paymentMethods;
    }
1174363
public function getList(array $options = array())
    {
        $options += array('index' => 'product_bundle_id');

        $result = &gplcart_static(gplcart_array_hash(array('product.bundle.list' => $options)));

        if (isset($result)) {
            return $result;
        }

        $this->hook->attach('product.bundle.list.before', $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $conditions = array();

        $sql = 'SELECT pb.*, p.store_id
                FROM product_bundle pb
                LEFT JOIN product p ON(pb.product_id = p.product_id)
                LEFT JOIN product p2 ON(pb.item_product_id = p2.product_id)';

        if (isset($options['product_bundle_id'])) {
            $sql .= ' WHERE pb.product_bundle_id = ?';
            $conditions[] = $options['product_bundle_id'];
        } else {
            $sql .= ' WHERE pb.product_bundle_id IS NOT NULL';
        }

        if (isset($options['store_id'])) {
            $sql .= ' AND p.store_id = ? AND p2.store_id = ?';
            $conditions[] = $options['store_id'];
            $conditions[] = $options['store_id'];
        }

        if (isset($options['status'])) {
            $sql .= ' AND p.status = ? AND p2.status = ?';
            $conditions[] = (int) $options['status'];
            $conditions[] = (int) $options['status'];
        }

        if (isset($options['product_id'])) {
            $sql .= ' AND pb.product_id = ?';
            $conditions[] = $options['product_id'];
        }

        if (!empty($options['limit'])) {
            $sql .= ' LIMIT ' . implode(',', array_map('intval', $options['limit']));
        }

        $result = $this->db->fetchAll($sql, $conditions, array('index' => $options['index']));
        $this->hook->attach('product.bundle.list.after', $options, $result, $this);
        return $result;
    }