Exemplo n.º 1
0
    protected function renderFlat(NodeInterface $node)
    {
        return '
		<li>
			<label>' . $node->getValue() . '</label>
		</li>
		' . $this->renderChildren($node);
    }
Exemplo n.º 2
0
 /**
  * @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;
 }