/** * returns the sections of a page * * to get all sections of all pages, leave param empty * * @access public * @param integer $page_id * @return array **/ public static function getSections($page_id = NULL) { if (!count(self::$pages)) { self::getInstance(); } if (!count(self::$pages_sections)) { self::$pages_sections = CAT_Sections::getActiveSections(); } if ($page_id) { return isset(self::$pages_sections[$page_id]) ? self::$pages_sections[$page_id] : array(); } else { return self::$pages_sections; } }