eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\RelationConverter::toStorageFieldDefinition PHP Method

toStorageFieldDefinition() public method

Converts field definition data in $fieldDef into $storageFieldDef.
public toStorageFieldDefinition ( eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef, StorageFieldDefinition $storageDef )
$fieldDef eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
$storageDef eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition
    public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef)
    {
        // Selection method, 0 = browse, 1 = dropdown
        $storageDef->dataInt1 = (int) $fieldDef->fieldTypeConstraints->fieldSettings['selectionMethod'];
        // Selection root, location ID
        $storageDef->dataInt2 = (int) $fieldDef->fieldTypeConstraints->fieldSettings['selectionRoot'];
    }