eZPublishCommunityProject  2012.12
eZ\Publish\API\Repository\URLAliasService Interface Reference
+ Inheritance diagram for eZ\Publish\API\Repository\URLAliasService:

Public Member Functions

 createGlobalUrlAlias ($resource, $path, $languageCode, $forwarding=false, $alwaysAvailable=false)
 Create a user chosen $alias pointing to a resource in $languageCode. More...
 
 createUrlAlias (Location $location, $path, $languageCode, $forwarding=false, $alwaysAvailable=false)
 Create a user chosen $alias pointing to $location in $languageCode. More...
 
 listGlobalAliases ($languageCode=null, $offset=0, $limit=-1)
 List global aliases. More...
 
 listLocationAliases (Location $location, $custom=true, $languageCode=null)
 List of url aliases pointing to $location. More...
 
 load ($id)
 Loads URL alias by given $id. More...
 
 lookup ($url, $languageCode=null)
 looks up the URLAlias for the given url. More...
 
 removeAliases (array $aliasList)
 Removes urls aliases. More...
 
 reverseLookup (Location $location, $languageCode=null)
 Returns the URL alias for the given location in the given language. More...
 

Member Function Documentation

eZ\Publish\API\Repository\URLAliasService::createGlobalUrlAlias (   $resource,
  $path,
  $languageCode,
  $forwarding = false,
  $alwaysAvailable = false 
)

Create a user chosen $alias pointing to a resource in $languageCode.

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.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionif the path already exists for the given language or if resource is not valid
Parameters
string$resource
string$path
string$languageCode
boolean$forwarding
boolean$alwaysAvailable
Returns

Implemented in eZ\Publish\Core\Repository\URLAliasService, eZ\Publish\Core\REST\Client\URLAliasService, and eZ\Publish\Core\SignalSlot\URLAliasService.

eZ\Publish\API\Repository\URLAliasService::createUrlAlias ( Location  $location,
  $path,
  $languageCode,
  $forwarding = false,
  $alwaysAvailable = false 
)

Create a user chosen $alias pointing to $location in $languageCode.

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.

Parameters
\eZ\Publish\API\Repository\Values\Content\Location$location
string$path
string$languageCodethe languageCode for which this alias is valid
boolean$forwardingif true a redirect is performed
boolean$alwaysAvailable
Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionif the path already exists for the given language
Returns

Implemented in eZ\Publish\Core\REST\Client\URLAliasService, eZ\Publish\Core\Repository\URLAliasService, and eZ\Publish\Core\SignalSlot\URLAliasService.

eZ\Publish\API\Repository\URLAliasService::listGlobalAliases (   $languageCode = null,
  $offset = 0,
  $limit = -1 
)

List global aliases.

Parameters
string$languageCodefilters those which are valid for the given language
int$offset
int$limit
Returns
[]

Implemented in eZ\Publish\Core\Repository\URLAliasService, eZ\Publish\Core\REST\Client\URLAliasService, and eZ\Publish\Core\SignalSlot\URLAliasService.

eZ\Publish\API\Repository\URLAliasService::listLocationAliases ( Location  $location,
  $custom = true,
  $languageCode = null 
)

List of url aliases pointing to $location.

Parameters
\eZ\Publish\API\Repository\Values\Content\Location$location
boolean$customif true the user generated aliases are listed otherwise the autogenerated
string$languageCodefilters those which are valid for the given language
Returns
[]

Implemented in eZ\Publish\Core\Repository\URLAliasService, eZ\Publish\Core\REST\Client\URLAliasService, and eZ\Publish\Core\SignalSlot\URLAliasService.

eZ\Publish\API\Repository\URLAliasService::load (   $id)

Loads URL alias by given $id.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundException
Parameters
string$id
Returns

Implemented in eZ\Publish\Core\Repository\URLAliasService, eZ\Publish\Core\REST\Client\URLAliasService, and eZ\Publish\Core\SignalSlot\URLAliasService.

eZ\Publish\API\Repository\URLAliasService::lookup (   $url,
  $languageCode = null 
)

looks up the URLAlias for the given url.

Parameters
string$url
string$languageCode
Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif the path does not exist or is not valid for the given language
Returns

Implemented in eZ\Publish\Core\Repository\URLAliasService, eZ\Publish\Core\REST\Client\URLAliasService, and eZ\Publish\Core\SignalSlot\URLAliasService.

eZ\Publish\API\Repository\URLAliasService::removeAliases ( array  $aliasList)

Removes urls aliases.

This method does not remove autogenerated aliases for locations.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionif alias list contains autogenerated alias
Parameters
\eZ\Publish\API\Repository\Values\Content\URLAlias[]$aliasList
Returns
void

Implemented in eZ\Publish\Core\Repository\URLAliasService, eZ\Publish\Core\REST\Client\URLAliasService, and eZ\Publish\Core\SignalSlot\URLAliasService.

eZ\Publish\API\Repository\URLAliasService::reverseLookup ( Location  $location,
  $languageCode = null 
)

Returns the URL alias for the given location in the given language.

If $languageCode is null the method returns the url alias in the most prioritized language.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif no url alias exist for the given language
Parameters
\eZ\Publish\API\Repository\Values\Content\Location$location
string$languageCode
Returns

Implemented in eZ\Publish\Core\Repository\URLAliasService, eZ\Publish\Core\REST\Client\URLAliasService, and eZ\Publish\Core\SignalSlot\URLAliasService.


The documentation for this interface was generated from the following file: