public function link($referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)
    {
        list($name, $params) = $this->getRouteNameAndParams();
        /** @var UrlGeneratorInterface $urlGenerator */
        $urlGenerator = $this->app['url_generator'];

        return $name ? $urlGenerator->generate($name, $params, $referenceType) : null;
    }
public function link($referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)
    {
        list($name, $params) = $this->getRouteNameAndParams();
        /** @var UrlGeneratorInterface $urlGenerator */
        $urlGenerator = $this->app['url_generator'];

        return $name ? $urlGenerator->generate($name, $params, $referenceType) : null;
    }
public function link ( $ referenceType = UrlGeneratorInterface :: ABSOLUTE_PATH ) { list ( $ name , $ params ) = $ this -> getRouteNameAndParams ( ) ; /** @var UrlGeneratorInterface $urlGenerator */ $ urlGenerator = $ this -> app [ 'url_generator' ] ; return $ name ? $ urlGenerator -> generate ( $ name , $ params , $ referenceType ) : null ; }
Creates a URL for the content record.

@param int $referenceType

@return string|null
Creates a URL for the content record .