@@ 151-158 (lines=8) @@ | ||
148 | * |
|
149 | * @return $this Chaining |
|
150 | */ |
|
151 | public function orderBy($fieldName, $order = 'ASC') |
|
152 | { |
|
153 | if (in_array($fieldName, self::$fieldIDs)) { |
|
154 | $this->orderBy = array($fieldName, $order); |
|
155 | } |
|
156 | ||
157 | return $this; |
|
158 | } |
|
159 | ||
160 | /** |
|
161 | * Add sorting to entity identifiers. |
@@ 97-104 (lines=8) @@ | ||
94 | * |
|
95 | * @return $this Chaining |
|
96 | */ |
|
97 | public function orderBy($fieldName, $order = 'ASC') |
|
98 | { |
|
99 | if (in_array($fieldName, static::$fieldIDs)) { |
|
100 | $this->orderBy = array($fieldName, $order); |
|
101 | } |
|
102 | ||
103 | return $this; |
|
104 | } |
|
105 | ||
106 | /** |
|
107 | * Perform SamsonCMS query and get entities collection. |