public function SchemaMetatagClient::sortAssocArray in Schema.org Metatag 8.2
Sort a nested associative array.
Parameters
array $array: The array to sort.
Overrides SchemaMetatagClientInterface::sortAssocArray
1 call to SchemaMetatagClient::sortAssocArray()
- SchemaMetatagClient::getObjectTree in src/
SchemaMetatagClient.php - Reorganize the classes into a hierarchical tree.
File
- src/
SchemaMetatagClient.php, line 388
Class
- SchemaMetatagClient
- Class SchemaMetatagClient.
Namespace
Drupal\schema_metatagCode
public function sortAssocArray(array &$array) {
ksort($array);
foreach ($array as &$a) {
if (is_array($a)) {
self::sortAssocArray($a);
}
}
}