You are here

public function SettingsTrait::getDefaultSetting in Markdown 8.2

1 call to SettingsTrait::getDefaultSetting()
SettingsTrait::createSettingElement in src/Traits/SettingsTrait.php
Creates a setting element.

File

src/Traits/SettingsTrait.php, line 90

Class

SettingsTrait
Trait for installable plugins that implement settings.

Namespace

Drupal\markdown\Traits

Code

public function getDefaultSetting($name) {
  $defaultSettings = static::defaultSettings($this
    ->getPluginDefinition());
  $parts = explode('.', $name);
  if (count($parts) == 1) {
    return isset($defaultSettings[$name]) ? $defaultSettings[$name] : NULL;
  }
  $value = NestedArray::getValue($defaultSettings, $parts, $key_exists);
  return $key_exists ? $value : NULL;
}