You are here

function finder::_element_weights in Finder 7.2

Recursively order elements in respect to parent-child relationships.

1 call to finder::_element_weights()
finder::element_weights in includes/finder.inc
Order elements by weight.

File

includes/finder.inc, line 178
finder.inc

Class

finder
An object to contain all of the data to generate a finder, plus the member functions to build the finder, and render the output.

Code

function _element_weights($parent, &$elements) {
  $elements[] = $parent;
  $parent_element = $this->elements[$parent];
  $child_elements = $this
    ->element_children($parent_element);
  foreach ($child_elements as $child) {
    $this
      ->_element_weights($child, $elements);
  }
}