Dodaje sortowanie
@param GridStateOrder $order
@return GridState
546891
public function addOrder(GridStateOrder $order)
    {
        $orders = $this->getOrder();
        //dodaje order
        $orders[$order->getTableName() . '.' . $order->getField()] = $order;
        return $this->setOrder($orders);
    }
853997
public function orderBy($field, $order = 'asc'){
        $this->model = $this->model->orderBy(...func_get_args());
        return $this;
    }
685056
public function order_by($criteria, $order = 'ASC')
    {
        if ( is_array($criteria) )
        {
            foreach ($criteria as $key => $value)
            {
                $this->_database->order_by($key, $value);
            }
        }
        else
        {
            $this->_database->order_by($criteria, $order);
        }
        return $this;
    }
230772
public function dispatchAction(Order $order)
    {
        $em = $this->getDoctrine()->getEntityManager();

        $order->dispatchBySeller($this->get('exchange_manager')->getExchange());

        $em->persist($order);
        $em->flush();

        $this->get('notifier')->notify(new OrderDispatchedBySellerEvent($order), $this->getUser());

        return $this->redirect($this->generateUrl('Order_show', array(
            'id' => $order->getNumberForPath()
        )));
    }
925773
public function orderBy($order, $append = true, $first = false)
    {
        return $this->command->orderBy($order, $append, $first);
    }
910669
public function setOrder($order)
    {
        $order = in_array($order, ['ASC', 'DESC']) ? $order : 'ASC';

        $this->order = $order;

        return $this;
    }
487158
public function order($order, $type = 'DESC')
    {

        $this->string['order'] .= $this->useBuilder('order')
            ->order($order, $type);

        return $this;
    }
480074
private function setOrder($order)
    {
        if (!\in_array($order, [self::ORDER_ASC, self::ORDER_DESC])) {
            throw new \InvalidArgumentException('Invalid order: ' . $order);
        }

        $this->order = $order;

        return $this;
    }
222646
public function orderBy($orderBy = NULL) {
        if (isset($orderBy)) {
            $this->setOrderBy($orderBy);
            return $this;
        }
        return $this->getOrderBy();
    }
149366
protected function visitSirelNodeOrder(Node\Order $order)
    {
        return $this->visit($order->getExpression()) . " "
            . ($order->isAscending() ? "ASC" : "DESC");
    }
541732
public function thenBy($order)
    {
        $order = LambdaUtils::toSelectCallable($order);
        $this->orders[] = array("property" => $order, "direction" => self::ORDER_ASC);
        return $this;
    }
457592
public function orderBy($column, $order = 'asc')
    {
        $this->order[0] = $column;
        $this->order[1] = strtolower($order) == 'desc' ? 'desc' : 'asc';
        return $this;
    }
739079
public function generateOrder($sortBy, $sortOrder, &$order)
    {
        if (! empty($sortBy)) {
            if (empty($sortOrder)) { // @codeCoverageIgnore
                $sortOrder = "ASC"; // @codeCoverageIgnore
            } // @codeCoverageIgnore

            $order = "$sortBy $sortOrder";
        }
    }
801173
public function sortOn(callable $fn, $order = Sort\ASC)
    {
        $this->items = Sort\comparison($this->items, $fn, $order);

        return $this;
    }
1231726
public function setOrder(\Core\Entity\Order $order = null) {
        $this->order = $order;

        return $this;
    }
926436
protected function normalizeOrder($order)
    {
        switch (strtolower($order)) {
            case 'asc':
                return 'asc';
            case 'desc':
                return 'desc';
            default:
                throw new QueryException(sprintf('Unsupported sorting method "%s" in query "%s"', $this->getType($order), $this->model->entity()));

        }
    }
590304
public function sort(array $order)
    {
        $criteria = Criteria::create()->orderBy($order);

        /** @var FlexCollectionInterface $matching */
        $matching = $this->matching($criteria);

        return $matching;
    }