Pour éventuellement ajouter un orderBy avec un order

@param string $orderBy - Afficher par
@param string $order - Ordre d'affichage
@return $this
509144
final public function orderBy(string $orderBy, string $order = 'ASC')
    {        
       $this->query->addOrderBy($orderBy, $order);

        return $this;
    }
174528
public function sort ($sort_on, $order = 'desc') {
		$queryString = '<FieldRef Name="'  .$sort_on . '" Ascending="' . $this->api->getSortFromValue($order) . '" />';
		$this->sort_caml = '<OrderBy>' . $queryString . '</OrderBy>';

		return $this;
	}
243734
protected function applyOrderBy(QueryBuilder $qb, $orderBy)
    {
        foreach ($orderBy as $order) {
            $column = $order->getField();
            if (strpos($column, '.') !== false) {
                [$relation, $column] = explode('.', $column);
                $childAlias = 'orderBy'.ucfirst($relation);
                $qb->leftJoin("{$this->queryAlias}.{$relation}", $childAlias);
                $qb->addOrderBy("$childAlias.$column", $order->getDirection());
            } else {
                if ($this->objectDefinition && $this->objectDefinition->hasField($column)) {
                    $column = $this->objectDefinition->getField($column)->getOriginName() ?: $column;
                }
                $qb->addOrderBy("{$this->queryAlias}.$column", $order->getDirection());
            }
        }
    }
478780
public function setOrder(\Librinfo\EcommerceBundle\Entity\Order $order = null)
    {
        $this->order = $order;

        return $this;
    }
831246
public function prepareOrder($order = null, $sort = null)
    {
        if ($order == null or $sort == null) {
            $this->setOrderBy = '';

            return $this;
        }

        if (!in_array($sort, ['ASC', 'DESC'])) {
            $sort = 'DESC';
        }

        $this->setOrderBy = ' ORDER BY ' . $order . ' ' . $sort;

        return $this;
    }
869039
final protected function order_by($column, $order = 'ASC'){
        $order = 'DESC' === strtoupper($order) ? 'DESC' : 'ASC';
        $this->_order_by[] = sprintf('%s %s', $this->escape_column_name($column), $order);
        return $this;
    }
951994
public function setOrder(\Gpupo\CommonSchema\ORM\Entity\Trading\Order\Order $order = null)
    {
        $this->order = $order;

        return $this;
    }
500917
public function setOrder(\HarvestCloud\CoreBundle\Entity\Order $order = null)
    {
        $this->order = $order;

        return $this;
    }
1236840
public function formatOrderBy(array $orderBy) {
        if ($orderBy) {
            $output = [];

            foreach ($orderBy as $field => $direction) {
                if ($direction instanceof Func) {
                    $output[] = $this->formatFunction($direction);
                } else {
                    $output[] = $this->quote($field) . ' ' . $this->getKeyword($direction);
                }
            }

            return sprintf($this->getClause(self::ORDER_BY), implode(', ', $output));
        }

        return '';
    }
622251
public function addOrder(\TechPromux\DynamicQueryBundle\Entity\DataModelOrder $order)
    {
        $this->orders[] = $order;

        return $this;
    }
1047286
private function _prepareOrderBy(array $orderByArray)
	{
		if(count($orderByArray) === 1)
		{
			foreach($orderByArray as $orderMode => $column)
			{
				$this->orderBy = 'ORDER BY ' . $column->getColumnName() . ' ' . $orderMode . ' ';
			}
		}
	}
320577
public function setOrder(string $order, string $direction): self
    {
        return $this->setParam('order', [$order => $direction]);
    }
793328
protected function prepareOrder(array &$order)
    {
        $this->setItemTotalFormatted($order, $this->price);
        $this->setItemTotalFormattedNumber($order, $this->price);
    }
866858
public function setOrderBy($order)
	{
		if(is_null($order))
		{
			$this->getSelect()->setOrder(null);
			return $this;
		}

		if(!is_array($order))
		{
			$order = array($order);
		}

		$sort = array();
		foreach($order as $value)
		{
			$direction = 1;
			if (preg_match('/(.*\W)(ASC|DESC)\b/si', $value, $matches)) {
				$value = trim($matches[1]);
				switch($matches[2])
				{
					case "ASC":
						$direction = 1;
						break;
					case "DESC":
						$direction = -1;
						break;
				}
			}

			$sort[$value] = $direction;
		}

		$this->getSelect()->setOrder($sort);
		return $this;
	}
829799
public function setOrder(\Sulu\Bundle\Sales\OrderBundle\Entity\Order $order = null)
    {
        $this->order = $order;
    
        return $this;
    }
495384
public function sortable($order = null)
    {
        if (null === $order) {
            return $this->sortable;
        }

        $this->sortable = $order;
        return $this;
    }
1205933
public function getPaginatorInstance($orderBy = 'updated_at', $order = 'desc')
    {
        if ($this->useSoftDeletes) {
            return $this->repository->withTrashed()->orderBy($orderBy, $order)->paginate();
        }

        return $this->repository->orderBy($orderBy, $order)->paginate();
    }