API17

JArrayHelper::sortObjects

From Joomla! Documentation

Revision as of 19:55, 23 April 2011 by Doxiki2 (talk | contribs) (Layout updates)

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.

Joomla 11.1 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]

Joomla 11.1

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)

Referenced by[edit]

See also[edit]

[Edit See Also]

Template:SeeAlso:JArrayHelper::sortObjects

Examples[edit]

<CodeExamplesForm />