orderBy() 공개 메소드

Returns new instance of collection.
public orderBy ( string | array $column, string $direction = self::ASC ) : Nextras\Orm\Collection\ICollection
$column string | array column name or array of column names
$direction string sorting direction self::ASC or self::DESC
리턴 Nextras\Orm\Collection\ICollection
 protected function applyDefaultOrder(ICollection $collection)
 {
     if ($this->metadata->relationship->order !== NULL) {
         return $collection->orderBy($this->metadata->relationship->order[0], $this->metadata->relationship->order[1]);
     } else {
         return $collection;
     }
 }