Class

eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway

abstract class Gateway extends StorageGateway

Abstract gateway class for Url field type.

Handles URL data.

Methods

array getIdUrlMap(array $ids)

Returns a list of URLs for a list of URL ids.

array getUrlIdMap(array $urls)

Returns a list of URL ids for a list of URLs.

int|string insertUrl(string $url)

Inserts a new $url and returns its id.

linkUrl(int|string $urlId, int|string $fieldId, int $versionNo)

Creates link to URL with $urlId for field with $fieldId in $versionNo.

unlinkUrl(int|string $fieldId, int $versionNo)

Removes link to URL for $fieldId in $versionNo and cleans up possibly orphaned URLs.

Details

at line 28
abstract public array getIdUrlMap(array $ids)

Returns a list of URLs for a list of URL ids.

Non-existent ids are ignored.

Parameters

array $ids An array of URL ids

Return Value

array An array of URLs, with ids as keys

at line 39
abstract public array getUrlIdMap(array $urls)

Returns a list of URL ids for a list of URLs.

Non-existent URLs are ignored.

Parameters

array $urls An array of URLs

Return Value

array An array of URL ids, with URLs as keys

at line 48
abstract public int|string insertUrl(string $url)

Inserts a new $url and returns its id.

Parameters

string $url The URL to insert in the database

Return Value

int|string

at line 57
abstract public linkUrl(int|string $urlId, int|string $fieldId, int $versionNo)

Creates link to URL with $urlId for field with $fieldId in $versionNo.

Parameters

int|string $urlId
int|string $fieldId
int $versionNo

at line 65
abstract public unlinkUrl(int|string $fieldId, int $versionNo)

Removes link to URL for $fieldId in $versionNo and cleans up possibly orphaned URLs.

Parameters

int|string $fieldId
int $versionNo