You are here

public static function DoubleField::subfieldTypes in Double Field 8.3

Same name and namespace in other branches
  1. 4.x src/Plugin/Field/FieldType/DoubleField.php \Drupal\double_field\Plugin\Field\FieldType\DoubleField::subfieldTypes()

Returns available subfield storage types.

7 calls to DoubleField::subfieldTypes()
Base::settingsForm in src/Plugin/Field/FieldFormatter/Base.php
Returns a form to configure settings for the formatter.
Base::settingsSummary in src/Plugin/Field/FieldFormatter/Base.php
Returns a short summary for the current formatter settings.
DoubleField::fieldSettingsForm in src/Plugin/Field/FieldType/DoubleField.php
Returns a form for the field-level settings.
DoubleField::propertyDefinitions in src/Plugin/Field/FieldType/DoubleField.php
Defines field item properties.
DoubleField::settingsForm in src/Plugin/Field/FieldWidget/DoubleField.php
Returns a form to configure settings for the widget.

... See full list

File

src/Plugin/Field/FieldType/DoubleField.php, line 576

Class

DoubleField
Plugin implementation of the 'double_field' field type.

Namespace

Drupal\double_field\Plugin\Field\FieldType

Code

public static function subfieldTypes() {
  $type_options = [
    'boolean' => t('Boolean'),
    'string' => t('Text'),
    'text' => t('Text (long)'),
    'integer' => t('Integer'),
    'float' => t('Float'),
    'numeric' => t('Decimal'),
    'email' => t('Email'),
    'telephone' => t('Telephone'),
    'datetime_iso8601' => t('Date'),
    // We only allow external links. So this should be URL from the user side.
    'uri' => t('Url'),
  ];
  return $type_options;
}