mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 10:02:42 +00:00
Set default sort direction to 'asc'.
This commit is contained in:
parent
4e8e266754
commit
543066f34a
2 changed files with 24 additions and 9 deletions
|
@ -800,12 +800,12 @@ class Hash {
|
|||
*
|
||||
* @param array $data An array of data to sort
|
||||
* @param string $path A Set-compatible path to the array value
|
||||
* @param string $dir See directions above.
|
||||
* @param string $dir See directions above. Defaults to 'asc'.
|
||||
* @param string $type See direction types above. Defaults to 'regular'.
|
||||
* @return array Sorted array of data
|
||||
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::sort
|
||||
*/
|
||||
public static function sort(array $data, $path, $dir, $type = 'regular') {
|
||||
public static function sort(array $data, $path, $dir = 'asc', $type = 'regular') {
|
||||
if (empty($data)) {
|
||||
return array();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue