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;
    }
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;
    }
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 ; }
NeoMerx override used to generate `self` links inside `included` node.

@param \Cake\Datasource\EntityInterface $entity Entity
@return array
NeoMerx override used to generate self links inside included node .