Sort this WireArray by the given properties.
Sort properties can be given as a string in the format
name, datestampor as an array of strings, i.e.
You may also specify the properties as
property.subproperty, where property resolves to a Wire derived object in each item, and subproperty resolves to a property within that object.
- Prepend or append a minus "-" to reverse the sort (per field).
// Sort newest to oldest $items->sort("-created"); // Sort by last_name then first_name $items->sort("last_name, first_name");
// basic usage $wireArray->sort($properties); // usage with all arguments $wireArray->sort($properties, $flags = null);
Field names to sort by (CSV string or array).
Optionally specify sort flags (see sortFlags method for details).
reference to current instance.
API reference based on ProcessWire core version 3.0.130