ensure_my_table(); $max_depth = isset($this->definition['max depth']) ? $this->definition['max depth'] : MENU_MAX_DEPTH; for ($i = 1; $i <= $max_depth; ++$i) { $this->query->add_orderby($this->table_alias, $this->field . $i, $this->options['order']); } } }