This documentation is for a version that has reached its End Of Life. Such versions are no longer supported and don't receive security updates. Consider updating to a newer version.
Step 2 - Define the Point 2D field type¶
The Type class¶
The Type contains logic of the field type: validating data, transforming from various formats, describing the validators, and more.
In this example Point 2D field type extends the Ibexa\Contracts\Core\FieldType\Generic\Type
class.
For more information about the Type class of a field type, see Type class.
Field type identifier¶
First, create src/FieldType/Point2D/Type.php
.
Add a getFieldTypeIdentifier()
method to it.
The new method returns the string that uniquely identifies your field type, in this case point2d
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Add a new service definition¶
Next, add the ibexa.field_type
tag to config/services.yaml
:
1 2 3 4 |
|