/** * Return all of the children of this album. Unless you specify a specific sort order, the * results will be ordered by this album's sort order. * * @chainable * @param integer SQL limit * @param integer SQL offset * @param array additional where clauses * @param array orderby * @return array ORM */ function children($limit = null, $offset = 0, $where = array(), $orderby = null) { if (empty($orderby)) { $orderby = array($this->sort_column => $this->sort_order); // Use id as a tie breaker if ($this->sort_column != "id") { $orderby["id"] = "ASC"; } } return parent::children($limit, $offset, $where, $orderby); }
/** * Return all of the children of this album. Unless you specify a specific sort order, the * results will be ordered by this album's sort order. * * @chainable * @param integer SQL limit * @param integer SQL offset * @param array additional where clauses * @param array orderby * @return array ORM */ function children($limit = null, $offset = 0, $where = array(), $orderby = null) { if (empty($orderby)) { $orderby = array($this->sort_column => $this->sort_order); } return parent::children($limit, $offset, $where, $orderby); }
/** * Return all of the children of this node, ordered by the defined sort order. * * @chainable * @param integer SQL limit * @param integer SQL offset * @return array ORM */ function children($limit = null, $offset = 0) { return parent::children($limit, $offset, array($this->sort_column => $this->sort_order)); }