Nextras\Orm\Collection\ArrayCollection::orderBy PHP Method

orderBy() public method

public orderBy ( $column, $direction = self::ASC )
    public function orderBy($column, $direction = self::ASC)
    {
        $collection = clone $this;
        if (is_array($column)) {
            foreach ($column as $col => $direction) {
                $collection->collectionSorter[] = [$col, $direction];
            }
        } else {
            $collection->collectionSorter[] = [$column, $direction];
        }
        return $collection;
    }