Class

eZ\Publish\Core\Repository\URLService

class URLService implements URLService

Methods

__construct(Repository $repository, Handler $urlHandler)

URLService constructor.

SearchResult findUrls(URLQuery $query)

Find URLs.

URL updateUrl(URL $url, URLUpdateStruct $struct)

Updates URL.

URL loadById(int $id)

Load single URL (by ID).

URL loadByUrl(string $url)

Load single URL (by URL).

URLUpdateStruct createUpdateStruct()

Instantiates a new URL update struct.

UsageSearchResult findUsages(URL $url, int $offset, int $limit = -1)

Find content objects using URL.

Details

at line 45
public __construct(Repository $repository, Handler $urlHandler)

URLService constructor.

Parameters

Repository $repository
Handler $urlHandler

at line 54
public SearchResult findUrls(URLQuery $query)

Find URLs.

Parameters

URLQuery $query

Return Value

SearchResult

Exceptions

UnauthorizedException

at line 84
public URL updateUrl(URL $url, URLUpdateStruct $struct)

Updates URL.

Parameters

URL $url
URLUpdateStruct $struct

Return Value

URL

Exceptions

NotFoundException
UnauthorizedException
InvalidArgumentException if the url already exists

at line 111
public URL loadById(int $id)

Load single URL (by ID).

Parameters

int $id ID of URL

Return Value

URL

Exceptions

NotFoundException
UnauthorizedException

at line 125
public URL loadByUrl(string $url)

Load single URL (by URL).

Parameters

string $url url

Return Value

URL

Exceptions

NotFoundException
UnauthorizedException

at line 139
public URLUpdateStruct createUpdateStruct()

Instantiates a new URL update struct.

Return Value

URLUpdateStruct

at line 147
public UsageSearchResult findUsages(URL $url, int $offset, int $limit = -1)

Find content objects using URL.

Content is filter by user permissions.

Parameters

URL $url
int $offset
int $limit

Return Value

UsageSearchResult