public function getIncludedResourceLinks($entity)
    {
        $repositoryName = $entity->getSource();
        if (!isset($this->_view->viewVars['_repositories'][$repositoryName])) {
            return [];
        }
        $repository = $this->_view->viewVars['_repositories'][$repositoryName];

        $url = Router::url($this->_getRepositoryRoutingParameters($repository) + [
            '_method' => 'GET',
            'action' => 'view',
            $entity->get($repository->getPrimaryKey()),
        ], $this->_view->viewVars['_absoluteLinks']);

        $links = [
            LinkInterface::SELF => new Link($url),
        ];

        return $links;
    }