@param string $dotProperty
@param        $order

@return ModelCriteria
@throws UseQueryFromDotNotationException
357360
public function orderBy(string $dotProperty, $order = Criteria::ASC): ModelCriteria
    {
        $property    = $this->before($dotProperty);
        $this->query = $this->query->orderBy($property, $order);
        $this->after();

        return $this->query;
    }
23749
public function getPaginator( $where = null, $order = null )
    {
        return $this->getMapper()
                    ->getPaginator( $where, $order );
    }
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()));

        }
    }
778350
public function createApmOrder($order = array())
    {
        $myOrder = new APMOrder($order);
        $response = OrderService::createOrder($myOrder);

        if (isset($response["orderCode"])) {
            //success
            return $response;
        } else {
            Error::throwError("apierror");
        }
    }
618675
public function findAllForNotifiableIdQb($id, $order = 'DESC')
    {
        return $this->createQueryBuilder('nn')
            ->addSelect('n')
            ->join('nn.notification', 'n')
            ->join('nn.notifiableEntity', 'ne')
            ->where('ne.id = :id')
            ->orderBy('n.id', $order)
            ->setParameter('id', $id)
        ;
    }
925773
public function orderBy($order, $append = true, $first = false)
    {
        return $this->command->orderBy($order, $append, $first);
    }
280060
private function parseOrderProperty(PropertyInterface $property, PropertyInterface $orderProperty)
    {
        $orderWidgets = [
            'pageTree'            => 'pageTreeOrder',
            'fileTree'            => 'fileTreeOrder',
            'DcGeneralTreePicker' => 'treePickerOrder'
        ];
        if (false === \array_key_exists($property->getWidgetType(), $orderWidgets)) {
            return;
        }

        $orderProperty->setWidgetType($orderWidgets[$property->getWidgetType()]);
    }
952918
protected function parseOrderWithModel(OrderInterface $order)
    {
        if ($this->hasModel()) {
            if ($order->hasProperty()) {
                $model    = $this->model();
                $property = $order->property();
                if (is_string($property) && $model->hasProperty($property)) {
                    $property = $model->property($property);

                    if ($property->l10n()) {
                        $order->setProperty($property->l10nIdent());
                    }
                }
            }

            if ($order instanceof OrderCollectionInterface) {
                $order->traverseOrders(function (OrderInterface $expr) {
                    $this->parseOrderWithModel($expr);
                });
            }
        }

        return $order;
    }
289804
public function thenByDesc($order)
    {
        $order = LambdaUtils::toSelectCallable($order);
        $this->orders[] = array("property" => $order, "direction" => self::ORDER_DESC);
        return $this;
    }
490927
protected function processOrder($order, $context)
    {
        if ($order instanceof Order || $order instanceof OrderByIsNull) {
            $column = $this->processColumnOrSubQuery($order->column, $context);

            if ($column === $order->column) {
                return $order;
            } elseif ($order instanceof Order) {
                return new Order($column, $order->isDescending);
            } else {
                return new OrderByIsNull($column, $order->areNullFirst);
            }
        }

        if ($order instanceof ExplicitOrder) {
            $column = $this->processColumnOrSubQuery($order->column, $context);

            $values = [];
            foreach ($order->order as $index => $value) {
                $values[$index] = $this->processValueOrSubQuery($value, $context);
            }

            if ($column === $order->column && $values === $order->order) {
                return $order;
            } else {
                return new ExplicitOrder($column, $values, $order->areOtherFirst);
            }
        }

        return $order;
    }
706349
public function order($order = null) {
		if ($order) {
			$this->_config['order'] = $order;
			return $this;
		}
		return $this->_config['order'];
	}
383028
public function orderBy(string $sort, string $order = 'ASC'): self
    {
        $order = 'ASC' === strtoupper($order) ? 'ASC' : 'DESC';
        $this->orderBy = [$sort => $order];
        return $this;
    }
1118145
public Swagger2MarkupConfigBuilder withPropertyOrdering(OrderBy orderBy) {
        Validate.notNull(orderBy, "%s must not be null", "orderBy");
        Validate.isTrue(orderBy != OrderBy.CUSTOM, "You must provide a custom comparator if orderBy == OrderBy.CUSTOM");
        config.propertyOrderBy = orderBy;
        return this;
    }
1031421
public function setColumnsOrder($order)
	{
		$new_order = [];

		foreach ($order as $key) {
			if (isset($this->columns[$key])) {
				$new_order[$key] = $this->columns[$key];
			}
		}

		if (sizeof($new_order) === sizeof($this->columns)) {
			$this->columns = $new_order;
		} else {
			throw new DataGridException('When changing columns order, you have to specify all columns');
		}

		return $this;
	}
910669
public function setOrder($order)
    {
        $order = in_array($order, ['ASC', 'DESC']) ? $order : 'ASC';

        $this->order = $order;

        return $this;
    }
951994
public function setOrder(\Gpupo\CommonSchema\ORM\Entity\Trading\Order\Order $order = null)
    {
        $this->order = $order;

        return $this;
    }
870473
private function setOrderType($data, ApiOrderInterface $order, $patch = false)
    {
        // get OrderType
        $type = $this->getProperty($data, 'type', $order->getType());
        // set order type
        if (isset($data['type'])) {
            if (is_array($type) && isset($type['id'])) {
                // if provided as array
                $typeId = $type['id'];
            } elseif (is_numeric($type)) {
                // if is numeric
                $typeId = $type;
            } else {
                throw new OrderException('No typeid given');
            }
        } elseif (!$patch) {
            // default type is manual
            $typeId = OrderType::MANUAL;
        } else {
            // keep current type
            return;
        }

        // get entity
        $orderType = $this->getOrderTypeEntityById($typeId);
        if (!$orderType) {
            throw new EntityNotFoundException(static::$orderTypeEntityName, $typeId);
        }

        // set order type
        $order->setType($orderType);
    }