Lines Matching +full:- +full:r

59         $this->nodeProcessor = $builder;
75 throw new \InvalidArgumentException('Recursion-filter must be callable');
77 $this->recursionDecision = $filter;
88 $this->flags |= $flag;
99 return ($this->flags & $flag) === $flag;
110 return ($this->flags & $flag) !== $flag;
121 $this->flags &= ~$flag;
133 if (!$this->generated) throw new \RuntimeException('need to call generate() first');
134 return $this->top;
140 * This is a cached version of top->getDescendants() with the ID as key of the returned array.
146 if (!$this->generated) throw new \RuntimeException('need to call generate() first');
147 if ($this->nodes === []) {
148 $this->nodes = [];
149 foreach ($this->top->getDescendants() as $node) {
150 $this->nodes[$node->getId()] = $node;
154 return $this->nodes;
164 if (!$this->generated) throw new \RuntimeException('need to call generate() first');
165 return array_filter($this->getAll(), fn($page) => !$page->getChildren());
175 if (!$this->generated) throw new \RuntimeException('need to call generate() first');
176 return array_filter($this->getAll(), fn($page) => (bool) $page->getChildren());
193 if (!$this->generated) throw new \RuntimeException('need to call generate() first');
194 $this->top->sort($comparator);
195 $this->nodes = []; // reset the cache
203 * @param Doku_Renderer $R The current renderer
208 public function render(Doku_Renderer $R, $top = null, $level = 1): void argument
210 if ($top === null) $top = $this->getTop();
212 $R->listu_open();
213 foreach ($top->getChildren() as $node) {
214 $R->listitem_open(1, $node->hasChildren());
215 $R->listcontent_open();
217 $R->externallink($node->getId(), $node->getTitle());
219 $R->internallink($node->getId(), $node->getTitle());
221 $R->listcontent_close();
222 if ($node->hasChildren()) {
223 $this->render($R, $node, $level + 1);
225 $R->listitem_close();
227 $R->listu_close();
236 if ($this->nodeProcessor === null) return $node;
237 $result = call_user_func($this->nodeProcessor, $node);
248 if ($this->recursionDecision === null) return true;
249 return (bool)call_user_func($this->recursionDecision, $node, $depth);
259 return implode("\n", $this->getAll());