Class

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

class LegacyStorage extends Gateway

Url field type external storage gateway implementation using Zeta Database Component.

Constants

URL_TABLE

URL_LINK_TABLE

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 insertUrl(string $url)

Inserts a new $url and returns its id.

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

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

unlinkUrl(int $fieldId, int $versionNo)

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

__construct(DatabaseHandler $dbHandler)

Details

at line 58
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 88
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 116
public int insertUrl(string $url)

Inserts a new $url and returns its id.

Parameters

string $url The URL to insert in the database

Return Value

int

at line 153
public linkUrl(int $urlId, int $fieldId, int $versionNo)

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

Parameters

int $urlId
int $fieldId
int $versionNo

at line 180
public unlinkUrl(int $fieldId, int $versionNo)

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

Parameters

int $fieldId
int $versionNo

at line 30
public __construct(DatabaseHandler $dbHandler)

Parameters

DatabaseHandler $dbHandler