public toFieldDefinition ( |
||
$storageDef | ||
$fieldDef | eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition |
public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef)
{
// Selection method, 0 = browse, 1 = dropdown
$fieldDef->fieldTypeConstraints->fieldSettings['selectionMethod'] = $storageDef->dataInt1;
// Selection root, location ID
$fieldDef->fieldTypeConstraints->fieldSettings['selectionRoot'] = $storageDef->dataInt2 === 0 ? '' : $storageDef->dataInt2;
}