PHP Class eZ\Publish\Core\FieldType\User\UserStorage

Methods in this interface are called by storage engine. $context array passed to most methods provides some context for the field handler about the currently used storage engine. The array should at least define 2 keys : - identifier (connection identifier) - connection (the connection handler) For example, using Legacy storage engine, $context will be: - identifier = 'LegacyStorage' - connection = {@link \eZ\Publish\Core\Persistence\Database\DatabaseHandler} object handler (for DB connection), to be used accordingly to {@link http://incubator.apache.org/zetacomponents/documentation/trunk/Database/tutorial.html ezcDatabase} usage The User storage handles the following attributes, following the user field type in eZ Publish 4: - account_key - has_stored_login - is_enabled - is_locked - last_visit - login_count
Inheritance: extends eZ\Publish\Core\FieldType\GatewayBasedStorage
Datei anzeigen Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
deleteFieldData ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, array $fieldIds, array $context ) : boolean
getFieldData ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field, array $context ) Populates $field value property based on the external data.
getIndexData ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field, array $context ) : eZ\Publish\SPI\Search\Field[]
hasFieldData ( ) : boolean Checks if field type has external data to deal with.
storeFieldData ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field, array $context ) : null | true Allows custom field types to store data in an external source (e.g. another DB table).

Method Details

deleteFieldData() public method

public deleteFieldData ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, array $fieldIds, array $context ) : boolean
$versionInfo eZ\Publish\SPI\Persistence\Content\VersionInfo
$fieldIds array Array of field Ids
$context array
return boolean

getFieldData() public method

$field->value is a {@link eZ\Publish\SPI\Persistence\Content\FieldValue} object. This value holds the data as a {@link eZ\Publish\Core\FieldType\Value} based object, according to the field type (e.g. for TextLine, it will be a {@link eZ\Publish\Core\FieldType\TextLine\Value} object).
public getFieldData ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field, array $context )
$versionInfo eZ\Publish\SPI\Persistence\Content\VersionInfo
$field eZ\Publish\SPI\Persistence\Content\Field
$context array

getIndexData() public method

public getIndexData ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field, array $context ) : eZ\Publish\SPI\Search\Field[]
$versionInfo eZ\Publish\SPI\Persistence\Content\VersionInfo
$field eZ\Publish\SPI\Persistence\Content\Field
$context array
return eZ\Publish\SPI\Search\Field[]

hasFieldData() public method

Checks if field type has external data to deal with.
public hasFieldData ( ) : boolean
return boolean

storeFieldData() public method

Stores value for $field in an external data source. The whole {@link eZ\Publish\SPI\Persistence\Content\Field} object is passed and its value is accessible through the {@link eZ\Publish\SPI\Persistence\Content\FieldValue} 'value' property. This value holds the data filled by the user as a {@link eZ\Publish\Core\FieldType\Value} based object, according to the field type (e.g. for TextLine, it will be a {@link eZ\Publish\Core\FieldType\TextLine\Value} object). $field->id = unique ID from the attribute tables (needs to be generated by database back end on create, before the external data source may be called from storing). The context array provides some context for the field handler about the currently used storage engine. The array should at least define 2 keys : - identifier (connection identifier) - connection (the connection handler) For example, using Legacy storage engine, $context will be: - identifier = 'LegacyStorage' - connection = {@link \eZ\Publish\Core\Persistence\Database\DatabaseHandler} object handler (for DB connection), to be used accordingly to The context array provides some context for the field handler about the currently used storage engine. The array should at least define 2 keys : - identifier (connection identifier) - connection (the connection handler) For example, using Legacy storage engine, $context will be: - identifier = 'LegacyStorage' - connection = {@link \eZ\Publish\Core\Persistence\Database\DatabaseHandler} object handler (for DB connection), to be used accordingly to {@link http://incubator.apache.org/zetacomponents/documentation/trunk/Database/tutorial.html ezcDatabase} usage This method might return true if $field needs to be updated after storage done here (to store a PK for instance). In any other case, this method must not return anything (null).
public storeFieldData ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field, array $context ) : null | true
$versionInfo eZ\Publish\SPI\Persistence\Content\VersionInfo
$field eZ\Publish\SPI\Persistence\Content\Field
$context array
return null | true