Message-ID: <978901635.4422.1485866440869.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_4421_671530407.1485866440869" ------=_Part_4421_671530407.1485866440869 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Settings schema and allowed validators

Settings schema and allowed validators

Internal FieldType conventions and best practices

FieldType->$settingsSchema and FieldType->$allowedValidators are i= ntentionally left free-form, to give broadest freedom to FieldType develope= rs. However, for internal FieldTypes (aka those delivered with eZ Publish),= a common standard should be established as best practice. The purpose of t= his page is to collect and unify this standard.

Settings schem= a

The general format of the settings schema of a FieldType is a hashmap of= setting names, assigned to their type and default value, e.g.:

array(
'myFancySetting' =3D> array(
'type' =3D>= ; 'int',
'default' =3D> 23,
),
'myOtherFancySet= ting' =3D> array(
'type' =3D> 'string',
'defaul= t' =3D> 'Sindelfingen',
),
);

The type should be either a valid PHP type shortcut (TB discussed) or on= e of the following special types:

Validators

Validators are internally handled through a special ValidatorService =E2= =80=A6 (TBD: Explain service and how it works)

The following validators are available and carry the defined settings = =E2=80=A6 (TBD: Collect validators and their settings)

------=_Part_4421_671530407.1485866440869--