Difference between revisions of "JArrayHelper::sortObjects"
From Joomla! Documentation
(Bulk upload by Doxiki2) |
(Layout updates) |
||
Line 50: | Line 50: | ||
array The sorted array of objects | array The sorted array of objects | ||
===Defined in=== | ===Defined in=== | ||
− | libraries/joomla/utilities/arrayhelper.php | + | libraries/joomla/utilities/arrayhelper.php (line 294) |
+ | * see source code in [[jplatform:utilities/arrayhelper.php#cl-294|BitBucket]] | ||
===Referenced by=== | ===Referenced by=== | ||
===See also=== | ===See also=== |
Revision as of 19:55, 23 April 2011
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JArrayHelper::sortObjects[edit]
Description[edit]
Utility function to sort an array of objects on a given field.
Template:Description:JArrayHelper::sortObjects [Edit Descripton]
Since[edit]
Synopsis[edit]
public static JArrayHelper::sortObjects (&$a, $k, $direction=1, $casesensitive=true, $locale=false)
Parameter | Type | Default | Description |
---|---|---|---|
&$a | array | $arr An array of objects | |
$k | array | The key or a array of key to sort on | |
$direction | array | 1 | Direction or an array of direction to sort in [1 = Ascending] [-1 = Descending] |
$casesensitive | array | true | Let sort occur casesensitive or insensitive |
$locale | array | false | Let sort occur using the locale language or not |
Returns[edit]
array The sorted array of objects
Defined in[edit]
libraries/joomla/utilities/arrayhelper.php (line 294)
- see source code in BitBucket
Referenced by[edit]
See also[edit]
Template:SeeAlso:JArrayHelper::sortObjects
Examples[edit]
<CodeExamplesForm />