Свойство | Тип | Описание | |
---|---|---|---|
$repository | eZ\Publish\API\Repository\Repository | ||
$settings | array | ||
$urlAliasHandler | eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler |
Метод | Описание | |
---|---|---|
__construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler $urlAliasHandler, array $settings = [] ) | Setups service with reference to repository object that created it & corresponding handler. | |
createGlobalUrlAlias ( string $resource, string $path, string $languageCode, boolean $forwarding = false, boolean $alwaysAvailable = false ) : eZ\Publish\API\Repository\Values\Content\URLAlias | Create a user chosen $alias pointing to a resource in $languageCode. | |
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 | Create a user chosen $alias pointing to $location in $languageCode. | |
listGlobalAliases ( string $languageCode = null, integer $offset, integer $limit ) : eZ\Publish\API\Repository\Values\Content\URLAlias[] | List global aliases. | |
listLocationAliases ( eZ\Publish\API\Repository\Values\Content\Location $location, boolean $custom = true, string $languageCode = null, null | boolean $showAllTranslations = null, array $prioritizedLanguageList = null ) : eZ\Publish\API\Repository\Values\Content\URLAlias[] | List of url aliases pointing to $location, sorted by language priority. | |
load ( string $id ) : eZ\Publish\API\Repository\Values\Content\URLAlias | Loads URL alias by given $id. | |
lookup ( string $url, string $languageCode = null ) : eZ\Publish\API\Repository\Values\Content\URLAlias | looks up the URLAlias for the given url. | |
removeAliases ( array $aliasList ) | Removes urls aliases. | |
reverseLookup ( eZ\Publish\API\Repository\Values\Content\Location $location, string $languageCode = null, null | boolean $showAllTranslations = null, array $prioritizedLanguageList = null ) : eZ\Publish\API\Repository\Values\Content\URLAlias | Returns the URL alias for the given location in the given language. |
Метод | Описание | |
---|---|---|
buildSPIUrlAlias ( eZ\Publish\API\Repository\Values\Content\URLAlias $urlAlias ) : eZ\Publish\SPI\Persistence\Content\URLAlias | Builds persistence domain object. | |
buildUrlAliasDomainObject ( eZ\Publish\SPI\Persistence\Content\URLAlias $spiUrlAlias, string | null $path ) : eZ\Publish\API\Repository\Values\Content\URLAlias | Builds API UrlAlias object from given SPI UrlAlias object. | |
choosePrioritizedLanguageCode ( array $entries, boolean $showAllTranslations, string[] $prioritizedLanguageList ) : string | boolean | Returns language code with highest priority. | |
cleanUrl ( string $url ) : string | ||
extractPath ( eZ\Publish\SPI\Persistence\Content\URLAlias $spiUrlAlias, string $languageCode, boolean $showAllTranslations, string[] $prioritizedLanguageList ) : string | boolean | Returns path extracted from normalized path data returned from persistence, using language settings. | |
isPathLoadable ( array $pathData, array $languageCodes ) : boolean | Returns true or false depending if URL alias is loadable or not for language settings in place. | |
isUrlAliasLoadable ( eZ\Publish\SPI\Persistence\Content\URLAlias $spiUrlAlias, string | null $languageCode, $showAllTranslations, $prioritizedLanguageList ) : boolean | Returns true or false depending if URL alias is loadable or not for language settings in place. | |
matchLanguageCode ( array $pathElementData, string $pathElement ) : string | boolean | ||
matchPath ( eZ\Publish\SPI\Persistence\Content\URLAlias $spiUrlAlias, string $path, string $languageCode ) : array | Matches path string with normalized path data returned from persistence. | |
selectAliasLanguageCode ( eZ\Publish\SPI\Persistence\Content\URLAlias $spiUrlAlias, string | null $languageCode, boolean $showAllTranslations, string[] $prioritizedLanguageList ) : string | boolean | Determines alias language code. |
Метод | Описание | |
---|---|---|
sortTranslationsByPrioritizedLanguages ( array $translations ) : array | Needed when translations for the part of the alias are the same for multiple languages. |
public __construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler $urlAliasHandler, array $settings = [] ) | ||
$repository | eZ\Publish\API\Repository\Repository | |
$urlAliasHandler | eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler | |
$settings | array |
protected buildSPIUrlAlias ( eZ\Publish\API\Repository\Values\Content\URLAlias $urlAlias ) : eZ\Publish\SPI\Persistence\Content\URLAlias | ||
$urlAlias | eZ\Publish\API\Repository\Values\Content\URLAlias | |
Результат | eZ\Publish\SPI\Persistence\Content\URLAlias |
protected buildUrlAliasDomainObject ( eZ\Publish\SPI\Persistence\Content\URLAlias $spiUrlAlias, string | null $path ) : eZ\Publish\API\Repository\Values\Content\URLAlias | ||
$spiUrlAlias | eZ\Publish\SPI\Persistence\Content\URLAlias | |
$path | string | null | |
Результат | eZ\Publish\API\Repository\Values\Content\URLAlias |
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 | |
Результат | eZ\Publish\API\Repository\Values\Content\URLAlias |
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 | |
Результат | eZ\Publish\API\Repository\Values\Content\URLAlias |
protected extractPath ( eZ\Publish\SPI\Persistence\Content\URLAlias $spiUrlAlias, string $languageCode, boolean $showAllTranslations, string[] $prioritizedLanguageList ) : string | boolean | ||
$spiUrlAlias | eZ\Publish\SPI\Persistence\Content\URLAlias | |
$languageCode | string | |
$showAllTranslations | boolean | |
$prioritizedLanguageList | string[] | |
Результат | string | boolean |
public listGlobalAliases ( string $languageCode = null, integer $offset, integer $limit ) : eZ\Publish\API\Repository\Values\Content\URLAlias[] | ||
$languageCode | string | filters those which are valid for the given language |
$offset | integer | |
$limit | integer | |
Результат | eZ\Publish\API\Repository\Values\Content\URLAlias[] |
public listLocationAliases ( eZ\Publish\API\Repository\Values\Content\Location $location, boolean $custom = true, string $languageCode = null, null | boolean $showAllTranslations = null, array $prioritizedLanguageList = null ) : eZ\Publish\API\Repository\Values\Content\URLAlias[] | ||
$location | eZ\Publish\API\Repository\Values\Content\Location | |
$custom | boolean | if true the user generated aliases are listed otherwise the autogenerated |
$languageCode | string | filters those which are valid for the given language |
$showAllTranslations | null | boolean | |
$prioritizedLanguageList | array | |
Результат | eZ\Publish\API\Repository\Values\Content\URLAlias[] |
public removeAliases ( array $aliasList ) | ||
$aliasList | array |
public reverseLookup ( eZ\Publish\API\Repository\Values\Content\Location $location, string $languageCode = null, null | boolean $showAllTranslations = null, array $prioritizedLanguageList = null ) : eZ\Publish\API\Repository\Values\Content\URLAlias | ||
$location | eZ\Publish\API\Repository\Values\Content\Location | |
$languageCode | string | |
$showAllTranslations | null | boolean | |
$prioritizedLanguageList | array | |
Результат | eZ\Publish\API\Repository\Values\Content\URLAlias |
protected selectAliasLanguageCode ( eZ\Publish\SPI\Persistence\Content\URLAlias $spiUrlAlias, string | null $languageCode, boolean $showAllTranslations, string[] $prioritizedLanguageList ) : string | boolean | ||
$spiUrlAlias | eZ\Publish\SPI\Persistence\Content\URLAlias | |
$languageCode | string | null | |
$showAllTranslations | boolean | |
$prioritizedLanguageList | string[] | |
Результат | string | boolean |
protected Repository,eZ\Publish\API\Repository $repository | ||
Результат | eZ\Publish\API\Repository\Repository |