bundle/Routing/SiteContentUrlAliasRouter.php
public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH): string
    {
        if (!$name instanceof Content && !$name instanceof ContentInfo) {
            throw new RouteNotFoundException('Could not match route');
        }

        if (empty($name->mainLocationId)) {
            throw new LogicException('Cannot generate an UrlAlias route for content without main location.');
        }

        return $this->generator->generate(
            $name->mainLocation->innerLocation,
            $parameters,
            $referenceType
        );
    }
public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH): string
    {
        if (!$name instanceof Content && !$name instanceof ContentInfo) {
            throw new RouteNotFoundException('Could not match route');
        }

        if (empty($name->mainLocationId)) {
            throw new LogicException('Cannot generate an UrlAlias route for content without main location.');
        }

        return $this->generator->generate(
            $name->mainLocation->innerLocation,
            $parameters,
            $referenceType
        );
    }
public function generate ( $ name , $ parameters = [ ] , $ referenceType = self :: ABSOLUTE_PATH ) : string { if ( ! $ name instanceof Content && ! $ name instanceof ContentInfo ) { throw new RouteNotFoundException ( 'Could not match route' ) ; } if ( empty ( $ name -> mainLocationId ) ) { throw new LogicException ( 'Cannot generate an UrlAlias route for content without main location.' ) ; } return $ this -> generator -> generate ( $ name -> mainLocation -> innerLocation , $ parameters , $ referenceType ) ; }
Generates a URL for Site API Content object or ContentInfo object, from the given parameters.

@param mixed $name
@param mixed $parameters
@param mixed $referenceType
Generates a URL for Site API Content object or ContentInfo object from the given parameters .