You are here

public static function ComputedFieldItemBase::defaultFieldSettings in Computed Field 8.2

Same name and namespace in other branches
  1. 3.x src/Plugin/Field/FieldType/ComputedFieldItemBase.php \Drupal\computed_field\Plugin\Field\FieldType\ComputedFieldItemBase::defaultFieldSettings()

Defines the field-level settings for this plugin.

Return value

array A list of default settings, keyed by the setting name.

Overrides FieldItemBase::defaultFieldSettings

File

src/Plugin/Field/FieldType/ComputedFieldItemBase.php, line 19

Class

ComputedFieldItemBase
Plugin base of the generic field type.

Namespace

Drupal\computed_field\Plugin\Field\FieldType

Code

public static function defaultFieldSettings() {
  return [
    'prefix' => '',
    'suffix' => '',
    'code' => '$value = 0;',
  ] + parent::defaultFieldSettings();
}