protected function publishUrlAliasesForContent(APIContent $content, $updatePathIdentificationString = true)
    {
        $urlAliasNames = $this->nameSchemaService->resolveUrlAliasSchema($content);
        $locations = $this->repository->getLocationService()->loadLocations(
            $content->getVersionInfo()->getContentInfo()
        );
        $urlAliasHandler = $this->persistenceHandler->urlAliasHandler();
        foreach ($locations as $location) {
            foreach ($urlAliasNames as $languageCode => $name) {
                $urlAliasHandler->publishUrlAliasForLocation(
                    $location->id,
                    $location->parentLocationId,
                    $name,
                    $languageCode,
                    $content->contentInfo->alwaysAvailable,
                    $updatePathIdentificationString ? $languageCode === $content->contentInfo->mainLanguageCode : false
                );
            }
            // archive URL aliases of Translations that got deleted
            $urlAliasHandler->archiveUrlAliasesForDeletedTranslations(
                $location->id,
                $location->parentLocationId,
                $content->versionInfo->languageCodes
            );
        }
    }
protected function publishUrlAliasesForContent(APIContent $content, $updatePathIdentificationString = true)
    {
        $urlAliasNames = $this->nameSchemaService->resolveUrlAliasSchema($content);
        $locations = $this->repository->getLocationService()->loadLocations(
            $content->getVersionInfo()->getContentInfo()
        );
        $urlAliasHandler = $this->persistenceHandler->urlAliasHandler();
        foreach ($locations as $location) {
            foreach ($urlAliasNames as $languageCode => $name) {
                $urlAliasHandler->publishUrlAliasForLocation(
                    $location->id,
                    $location->parentLocationId,
                    $name,
                    $languageCode,
                    $content->contentInfo->alwaysAvailable,
                    $updatePathIdentificationString ? $languageCode === $content->contentInfo->mainLanguageCode : false
                );
            }
            // archive URL aliases of Translations that got deleted
            $urlAliasHandler->archiveUrlAliasesForDeletedTranslations(
                $location->id,
                $location->parentLocationId,
                $content->versionInfo->languageCodes
            );
        }
    }
protected function publishUrlAliasesForContent ( APIContent $ content , $ updatePathIdentificationString = true ) { $ urlAliasNames = $ this -> nameSchemaService -> resolveUrlAliasSchema ( $ content ) ; $ locations = $ this -> repository -> getLocationService ( ) -> loadLocations ( $ content -> getVersionInfo ( ) -> getContentInfo ( ) ) ; $ urlAliasHandler = $ this -> persistenceHandler -> urlAliasHandler ( ) ; foreach ( $ locations as $ location ) { foreach ( $ urlAliasNames as $ languageCode => $ name ) { $ urlAliasHandler -> publishUrlAliasForLocation ( $ location -> id , $ location -> parentLocationId , $ name , $ languageCode , $ content -> contentInfo -> alwaysAvailable , $ updatePathIdentificationString ? $ languageCode === $ content -> contentInfo -> mainLanguageCode : false ) ; } // archive URL aliases of Translations that got deleted $ urlAliasHandler -> archiveUrlAliasesForDeletedTranslations ( $ location -> id , $ location -> parentLocationId , $ content -> versionInfo -> languageCodes ) ; } }
Publishes URL aliases for all locations of a given content.

@param \eZ\Publish\API\Repository\Values\Content\Content $content
@param bool $updatePathIdentificationString this parameter is legacy storage specific for updating
ezcontentobject_tree.path_identification_string, it is ignored by other storage engines
Publishes URL aliases for all locations of a given content .