I am getting error:
Node is not related to this repository
500 Internal Server Error - InvalidArgumentException
UPDATE 1: it does not matter if
Got it working!
Here are the needed changes:
instead of
nodeDecorator' => function($node) use ($repo)
{
return ''. $node['title'] .'';
}
one should write
'nodeDecorator' => function($node) use ($repo)
{
return ''. $node['title'] .'';
}
and in Category class add
public function __toString()
{
return $this->getTitle();
}
That is it, path to each node now should be showing.