You are here

protected static function Dimension::_defaultFieldSettings in Dimension 2.1.x

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldType/Dimension.php \Drupal\dimension\Plugin\Field\FieldType\Dimension::_defaultFieldSettings()
  2. 2.0.x src/Plugin/Field/FieldType/Dimension.php \Drupal\dimension\Plugin\Field\FieldType\Dimension::_defaultFieldSettings()

Parameters

$fields:

Return value

array[]

3 calls to Dimension::_defaultFieldSettings()
Area::defaultFieldSettings in src/Plugin/Field/FieldType/Area.php
Defines the field-level settings for this plugin.
Length::defaultFieldSettings in src/Plugin/Field/FieldType/Length.php
Defines the field-level settings for this plugin.
Volume::defaultFieldSettings in src/Plugin/Field/FieldType/Volume.php
Defines the field-level settings for this plugin.

File

src/Plugin/Field/FieldType/Dimension.php, line 36

Class

Dimension

Namespace

Drupal\dimension\Plugin\Field\FieldType

Code

protected static function _defaultFieldSettings($fields) : array {
  $settings = [
    'value' => [
      'factor' => 1,
      'min' => '',
      'max' => '',
      'prefix' => '',
      'suffix' => '',
    ],
  ];
  foreach ($fields as $key => $label) {
    $settings[$key] = [
      'factor' => 1,
      'min' => '',
      'max' => '',
      'prefix' => '',
      'suffix' => '',
    ];
  }
  return $settings;
}