You are here

public static function RadioactivityEnergy::defaultSettings in Radioactivity 4.0.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/Field/FieldWidget/RadioactivityEnergy.php \Drupal\radioactivity\Plugin\Field\FieldWidget\RadioactivityEnergy::defaultSettings()

Defines the default settings for this plugin.

Return value

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

Overrides PluginSettingsBase::defaultSettings

File

src/Plugin/Field/FieldWidget/RadioactivityEnergy.php, line 25

Class

RadioactivityEnergy
Plugin implementation of the 'radioactivity_energy' widget.

Namespace

Drupal\radioactivity\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {
  return [
    'energy' => 0.0,
    'timestamp' => \Drupal::time()
      ->getRequestTime(),
  ] + parent::defaultSettings();
}