You are here

public function SettingsTrait::getSetting in Markdown 8.2

2 calls to SettingsTrait::getSetting()
EmojiExtension::register in src/Plugin/Markdown/CommonMark/Extension/EmojiExtension.php
Allows the extension to register itself with the CommonMark Environment.
SettingsTrait::createSettingElement in src/Traits/SettingsTrait.php
Creates a setting element.

File

src/Traits/SettingsTrait.php, line 103

Class

SettingsTrait
Trait for installable plugins that implement settings.

Namespace

Drupal\markdown\Traits

Code

public function getSetting($name, $default = NULL) {
  $value = $this
    ->config()
    ->get("settings.{$name}");
  return isset($value) ? $value : $default;
}