Class

eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway

abstract class Gateway extends StorageGateway

Abstract gateway class for RichText type.

Handles data that is not directly included in raw XML value from the field (i.e. URLs).

Methods

__construct(Gateway $urlGateway)

array getContentIds(array $remoteIds)

Returns a list of Content ids for a list of remote ids.

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 25
public __construct(Gateway $urlGateway)

Parameters

Gateway $urlGateway

at line 39
abstract public array getContentIds(array $remoteIds)

Returns a list of Content ids for a list of remote ids.

Non-existent ids are ignored.

Parameters

array $remoteIds An array of Content remote ids

Return Value

array An array of Content ids, with remote ids as keys

at line 50
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 64
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 76
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 88
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 99
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