Provides generic array sorting helper methods.
Hierarchy
- class \Drupal\Component\Utility\SortArray
Related topics
- Utility classes and functions
- Overview of utility classes and functions for developers.
File
- core/lib/Drupal/Component/Utility/SortArray.php, line 10
Namespace
Drupal\Component\Utility
Members
Name | Modifiers | Type | Description |
---|---|---|---|
SortArray::sortByKeyInt | public static | function | Sorts an integer array item by an arbitrary key. |
SortArray::sortByKeyString | public static | function | Sorts a string array item by an arbitrary key. |
SortArray::sortByTitleElement | public static | function | Sorts a structured array by 'title' key (no # prefix). |
SortArray::sortByTitleProperty | public static | function | Sorts a structured array by '#title' property. |
SortArray::sortByWeightElement | public static | function | Sorts a structured array by the 'weight' element. |
SortArray::sortByWeightProperty | public static | function | Sorts a structured array by '#weight' property. |
Please login to continue.