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

createGlobalUrlAlias() public method

This method does not handle location resources - if a user enters a location target the createCustomUrlAlias method has to be used. This method runs URL filters and 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 createGlobalUrlAlias ( string $resource, string $path, string $languageCode, boolean $forwarding = false, boolean $alwaysAvailable = false ) : eZ\Publish\API\Repository\Values\Content\URLAlias
$resource string
$path string
$languageCode string
$forwarding boolean
$alwaysAvailable boolean
return eZ\Publish\API\Repository\Values\Content\URLAlias
    public function createGlobalUrlAlias($resource, $path, $languageCode, $forwarding = false, $alwaysAvailable = false)
    {
        $returnValue = $this->service->createGlobalUrlAlias($resource, $path, $languageCode, $forwarding, $alwaysAvailable);
        $this->signalDispatcher->emit(new CreateGlobalUrlAliasSignal(array('urlAliasId' => $returnValue->id)));
        return $returnValue;
    }