private function ViewsEFFieldsetData::sortByWeight in Views Exposed Form Fieldset 8
Internal function used to sort array items by weight.
Parameters
array $a: First element.
array $b: Second element.
Return value
int The weight.
File
- src/
ViewsEFFieldsetData.php, line 218
Class
- ViewsEFFieldsetData
- Class ViewsEFFieldsetData.
Namespace
Drupal\views_ef_fieldsetCode
private function sortByWeight(array $a, array $b) {
if ($a['item']['weight'] === $b['item']['weight']) {
return 0;
}
return $a['item']['weight'] < $b['item']['weight'] ? -1 : 1;
}