Remove order from available orders if exists.

@param string $order
@return $this
486208
public function removeOrderFromAvailableOrders($order)
    {
        $this->loadAvailableOrders();

        if (isset($this->availableOrder[$order])) {
            unset($this->availableOrder[$order]);
        }

        return $this;
    }
924031
public function addSorting($sort, $order = SearchQuery::SORT_ASC)
    {
        $this->searchQuery->addSorting($sort, $order);

        return $this;
    }
457592
public function orderBy($column, $order = 'asc')
    {
        $this->order[0] = $column;
        $this->order[1] = strtolower($order) == 'desc' ? 'desc' : 'asc';
        return $this;
    }
801173
public function sortOn(callable $fn, $order = Sort\ASC)
    {
        $this->items = Sort\comparison($this->items, $fn, $order);

        return $this;
    }
829799
public function setOrder(\Sulu\Bundle\Sales\OrderBundle\Entity\Order $order = null)
    {
        $this->order = $order;
    
        return $this;
    }
846537
public function destroy(Order $order)
    {
        $this->order->destroy($order);

        return redirect()->route('admin.order.order.index')
            ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('order::orders.title.orders')]));
    }
628966
public function order($rule, $order = null){
		if($this->validateConditions())
			return $this;

		$this->resetState();

		if(is_array($rule) || $rule instanceof Traversable){
			foreach($rule as $key => $val){
				$this->order($key, $val);
			}
			return $this;
		}
		$this->sorting[] = array($rule, $order);

		return $this;
	}
1114219
public function orderBy($sort, $order = 'ASC') {
        if ($order == 'ASC' || $order == 'DESC') {
            $this->q->apd(' ORDER BY ' . $sort . ' ' .$order);
        } else {
            $this->setError('q', 'No valid order');
            return false;
        }

        return $this;
    }
1156577
public function setOrderable($orderable)
    {
        if ($orderable === 'true') {
            $this->orderable = true;

            return $this;
        }
        $this->orderable = false;

        return $this;
    }
300487
public function sortKeys($order = SORT_ASC, $strategy = SORT_REGULAR)
    {
        $this->sortingKeys($this->elements, $order, $strategy);

        return $this;
    }
249699
protected function createItemBagForOrder(Order $order)
    {
        if (!$this->sendCartInfo) {
            return null;
        }

        $items = $this->getItemListForOrder($order);
        $itemBagClassName = $this->getItemBagClassName();

        return new $itemBagClassName($items);
    }
1148044
public final function setOrderData(Order $order)
    {
        if (get_called_class() != self::class) {
            throw new \InvalidArgumentException("Method can be call only by OrderFinalized entity");
        }
        $this->id = $order->id;
        $this->setProperties($order);
    }
1042846
public function orderBy($order = null) {
		if (is_null($order)) //remove option
			return $this->discard('query.orderBy');
			
		return $this->merge(['query.orderBy' => func_get_args()]);
	}
90252
public function setOrder($order)
    {
        if (!in_array($order, [self::ORDER_ASC, self::ORDER_DESC])) {
            throw new LogicException('Invalid order argument.');
        }

        $this->order = $order;

        return $this;
    }
684956
public function allowCancel($order)
    {
        /** @var SalesDependencyClassInterface $dependency */
        foreach ($this->dependencyClasses as $dependency) {
            if (!$dependency->allowCancel($order)) {
                return false;
            }
        }

        return true;
    }
320577
public function setOrder(string $order, string $direction): self
    {
        return $this->setParam('order', [$order => $direction]);
    }
1326346
protected function _cancelOrder()
    {
         if ($this->_order->getId()) {
            // Only save order that's in this magento store
            $this->_order->cancel()->save();
        } else {
            // The order is not in this magento store, simply set state of this empty order to cancel
            $this->_order->setState(Mage_Sales_Model_Order::STATE_CANCELED);
        }
        return $this;
    }