86 $this->count = count($c);
128 return $this->headings[$n];
147 return html_entity_decode(strip_tags($this->headings[$n]), ENT_QUOTES,
'UTF-8');
159 return $this->urls[$n];
171 return $this->levels[$n];
183 return $this->contents[$n];
196 for (
$i = 0;
$i < $this->count; ++
$i) {
197 if ($this->levels[
$i] == 1
198 && (!$ignoreHidden || !$this->isHidden(
$i))
221 $ll = $cf[
'menu'][
'levelcatch'];
222 for (
$i = $n + 1;
$i < $this->count; ++
$i) {
223 if ($ignoreHidden && $this->isHidden(
$i)) {
226 if ($this->levels[
$i] <= $this->levels[$n]) {
229 if ($this->levels[
$i] <= $ll) {
231 $ll = $this->levels[
$i];
246 public function parent($n, $ignoreHidden =
true)
248 for (
$i = $n - 1;
$i >= 0; --
$i) {
249 if ($this->levels[
$i] < $this->levels[$n]
250 && (!$ignoreHidden || !$this->isHidden(
$i))
272 $parent = $this->parent($pageIndex, $ignoreHidden);
273 if ($parent === null) {
277 $pageIndex = $parent;
291 for (
$i = 0;
$i < $this->count;
$i++) {
292 if ($this->headings[
$i] == $heading) {
309 public function linkList($prefix =
'', $ignoreHidden =
true)
312 for (
$i = 0;
$i < $this->count;
$i++) {
313 if (!$ignoreHidden || !$this->isHidden(
$i)) {
314 $indent = str_repeat(
"\xC2\xA0", 4 * ($this->level(
$i) - 1));
315 $heading = $prefix . $indent . $this->heading(
$i);
316 $result[] = array($heading, $this->url(
$i));
getAncestorsOf($pageIndex, $ignoreHidden=true)
children($n, $ignoreHidden=true)
toplevels($ignoreHidden=true)
pageWithHeading($heading)
linkList($prefix='', $ignoreHidden=true)
parent($n, $ignoreHidden=true)