This field type Field Type represents one or multiple countries.
...
Table of Contents | ||
---|---|---|
|
Description
This FieldType Field Type makes possible to store and retrieve data representing countries.
...
Type | Example | |||||||
---|---|---|---|---|---|---|---|---|
array |
|
Note: When you set a an array directly on Content field you don't need to provide all this information, the FieldType Field Type will assume it is a hash and in this case it will accept a simplified structure described below in the under To / From Hash format.
Validation
This FieldType Field Type validates if the multiple countries are allowed by the field definition, and if the Alpha2 is valid according to the countries configured in eZ PublishPlatform.
Settings
The field definition of this FieldType Field Type can be configured with one option:
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$settings = array( "isMultiple" => true ); |
Anchor | ||||
---|---|---|---|---|
|
The format used for serialization is simpler then than the full format, this is also available when setting value on the content field, by setting the value to a an array instead of the Value object. Example of that shown below:
...
The format used by the toHash method is the Alpha2 value, however the input is cable capable of accepting either Name, Alpha2 or Alpha3 value as shown below in the Value object section.
...