You are here

protected static function Dimension::_defaultSettings in Dimension 2.0.x

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

Parameters

$fields:

Return value

array

3 calls to Dimension::_defaultSettings()
Area::defaultSettings in src/Plugin/Field/FieldWidget/Area.php
Defines the default settings for this plugin.
Length::defaultSettings in src/Plugin/Field/FieldWidget/Length.php
Defines the default settings for this plugin.
Volume::defaultSettings in src/Plugin/Field/FieldWidget/Volume.php
Defines the default settings for this plugin.

File

src/Plugin/Field/FieldWidget/Dimension.php, line 18

Class

Dimension

Namespace

Drupal\dimension\Plugin\Field\FieldWidget

Code

protected static function _defaultSettings($fields) : array {
  $settings = [];
  foreach ($fields as $key => $label) {
    $settings[$key] = [
      'placeholder' => '',
      'label' => $label,
      'description' => '',
    ];
  }
  return $settings;
}