public static function InternationalPhone::propertyDefinitions in International Phone Field 8
Field type properties definition.
Inside this method we defines all the fields (properties) that our custom field type will have.
Here there is a list of allowed property types: https://goo.gl/sIBBgO
Overrides FieldItemInterface::propertyDefinitions
File
- src/
Plugin/ Field/ FieldType/ InternationalPhone.php, line 31
Class
- InternationalPhone
- Plugin implementation of the 'Internation Phone' field type.
Namespace
Drupal\international_phone\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(StorageDefinition $storage) {
$properties = [];
$properties['value'] = DataDefinition::create('string')
->setLabel(t('International Phone'));
return $properties;
}