protected function parseLinks(LinkCollection $annot, $view, \stdClass $output, $object)
    {
        $generator = $this->linkGenerator;
        array_walk(
            $annot->links,
            function($link) use ($view, $output, $generator, $object) {
                if ($view == null || in_array($view, $link->views)) {
                    $name = $generator->parseName($link, $object);
                    $output->$name = $generator->generate($link, $object);
                }
            }
        );

        return $output;
    }