eZ\Publish\Core\SignalSlot\URLAliasService::createUrlAlias PHP Method

createUrlAlias() public method

This method runs URL filters and transformers before storing them. Hence the path returned in the URLAlias Value may differ from the given. $alwaysAvailable makes the alias available in all languages.
public createUrlAlias ( eZ\Publish\API\Repository\Values\Content\Location $location, string $path, string $languageCode, boolean $forwarding = false, boolean $alwaysAvailable = false ) : eZ\Publish\API\Repository\Values\Content\URLAlias
$location eZ\Publish\API\Repository\Values\Content\Location
$path string
$languageCode string the languageCode for which this alias is valid
$forwarding boolean if true a redirect is performed
$alwaysAvailable boolean
return eZ\Publish\API\Repository\Values\Content\URLAlias
    public function createUrlAlias(Location $location, $path, $languageCode, $forwarding = false, $alwaysAvailable = false)
    {
        $returnValue = $this->service->createUrlAlias($location, $path, $languageCode, $forwarding, $alwaysAvailable);
        $this->signalDispatcher->emit(new CreateUrlAliasSignal(array('urlAliasId' => $returnValue->id)));
        return $returnValue;
    }