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

Handles data that is not directly included in raw XML value from the field (i.e. URLs).
Inheritance: extends eZ\Publish\Core\FieldType\StorageGateway
Datei anzeigen Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$urlGateway eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway

Public Methods

Method Description
__construct ( Gateway $urlGateway )
getContentIds ( array $remoteIds ) : array Returns a list of Content ids for a list of remote ids.
getIdUrlMap ( array $ids ) : array Returns a list of URLs for a list of URL ids.
getUrlIdMap ( array $urls ) : array Returns a list of URL ids for a list of URLs.
insertUrl ( string $url ) : integer | string Inserts a new $url and returns its id.
linkUrl ( integer | string $urlId, integer | string $fieldId, integer $versionNo ) Creates link to URL with $urlId for field with $fieldId in $versionNo.
unlinkUrl ( integer | string $fieldId, integer $versionNo ) Removes link to URL for $fieldId in $versionNo and cleans up possibly orphaned URLs.

Method Details

__construct() public method

public __construct ( Gateway $urlGateway )
$urlGateway eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway

getContentIds() abstract public method

Non-existent ids are ignored.
abstract public getContentIds ( array $remoteIds ) : array
$remoteIds array An array of Content remote ids
return array An array of Content ids, with remote ids as keys

getIdUrlMap() public method

Non-existent ids are ignored.
public getIdUrlMap ( array $ids ) : array
$ids array An array of URL ids
return array An array of URLs, with ids as keys

getUrlIdMap() public method

Non-existent URLs are ignored.
public getUrlIdMap ( array $urls ) : array
$urls array An array of URLs
return array An array of URL ids, with URLs as keys

insertUrl() public method

Inserts a new $url and returns its id.
public insertUrl ( string $url ) : integer | string
$url string The URL to insert in the database
return integer | string

linkUrl() public method

Creates link to URL with $urlId for field with $fieldId in $versionNo.
public linkUrl ( integer | string $urlId, integer | string $fieldId, integer $versionNo )
$urlId integer | string
$fieldId integer | string
$versionNo integer

unlinkUrl() public method

Removes link to URL for $fieldId in $versionNo and cleans up possibly orphaned URLs.
public unlinkUrl ( integer | string $fieldId, integer $versionNo )
$fieldId integer | string
$versionNo integer

Property Details

$urlGateway protected_oe property

protected Gateway,eZ\Publish\Core\FieldType\Url\UrlStorage $urlGateway
return eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway