function PluginSettingsBase::mergeDefaults

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/PluginSettingsBase.php \Drupal\Core\Field\PluginSettingsBase::mergeDefaults()
  2. 8.9.x core/lib/Drupal/Core/Field/PluginSettingsBase.php \Drupal\Core\Field\PluginSettingsBase::mergeDefaults()
  3. 10 core/lib/Drupal/Core/Field/PluginSettingsBase.php \Drupal\Core\Field\PluginSettingsBase::mergeDefaults()

Merges default settings values into $settings.

2 calls to PluginSettingsBase::mergeDefaults()
PluginSettingsBase::getSetting in core/lib/Drupal/Core/Field/PluginSettingsBase.php
PluginSettingsBase::getSettings in core/lib/Drupal/Core/Field/PluginSettingsBase.php

File

core/lib/Drupal/Core/Field/PluginSettingsBase.php, line 70

Class

PluginSettingsBase
Base class for the Field API plugins.

Namespace

Drupal\Core\Field

Code

protected function mergeDefaults() {
    $this->settings += static::defaultSettings();
    $this->defaultSettingsMerged = TRUE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.