protected function renderFlat(NodeInterface $node) { return ' <li> <label>' . $node->getValue() . '</label> </li> ' . $this->renderChildren($node); }
/** * @param NodeInterface $node * @return Node|null */ public function visit(NodeInterface $node) { $currAc = $node->getValue(); if ($currAc instanceof Account && $currAc->getId() == $this->valueToFind) { return $node; } foreach ($node->getChildren() as $child) { /** @noinspection PhpVoidFunctionResultUsedInspection */ $found = $child->accept($this); if (!is_null($found)) { return $found; } } return null; }