/** * Accepts array('info' => [page info array], all options accepted by getPagesInfo except where) * @param mixed $options * @return mixed */ public static function getChildrenInfo($options) { $id = $options['info']['id']; if (!isset(aPageTable::$childrenInfo[$id])) { $lft = $options['info']['lft']; $rgt = $options['info']['rgt']; $level = $options['info']['level'] + 1; aPageTable::$childrenInfo[$id] = aPageTable::getPagesInfo(array_merge($options, array('where' => '(( p.lft > ' . $lft . ' AND p.rgt < ' . $rgt . ' ) AND (level = ' . $level . '))'))); } return aPageTable::$childrenInfo[$id]; }
/** * This is the low level query method used to implement the above. You won't call this directly * unless you're implementing a new type of query for related pages. * The $livingOnly option is present for bc only and is ignored (we look at what the current user can see) * @param mixed $livingOnly * @param mixed $where * @param mixed $admin * @return mixed */ protected function getPagesInfo($livingOnly = true, $where, $admin = false) { return aPageTable::getPagesInfo(array('culture' => $this->getCulture(), 'where' => $where, 'admin' => $admin)); }