protected function FacetapiWidget::applySorts in Facet API 6.3
Same name and namespace in other branches
- 7.2 plugins/facetapi/widget.inc \FacetapiWidget::applySorts()
- 7 plugins/facetapi/widget.inc \FacetapiWidget::applySorts()
Sorts the facet's build array.
Parameters
array &$build: Reference to the render array, allows us to sort one hierarchical level at a time.
1 call to FacetapiWidget::applySorts()
- FacetapiWidget::sortFacet in plugins/
facetapi/ widget.inc - Applies selected sorting algorithms to the render array.
File
- plugins/
facetapi/ widget.inc, line 226 - Abstract widget plugin class.
Class
- FacetapiWidget
- Base class for widget plugins.
Code
protected function applySorts(&$build) {
foreach (element_children($build) as $value) {
if (!empty($build[$value]['#item_children'])) {
$this
->applySorts($build[$value]['#item_children']);
}
}
uasort($build, array(
$this,
'sortCallback',
));
}