You are here

public function DevelGenerateBase::getSetting in Devel 8.2

Same name and namespace in other branches
  1. 8.3 devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::getSetting()
  2. 8 devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::getSetting()
  3. 4.x devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::getSetting()

Returns the array of settings, including defaults for missing settings.

Return value

array The array of settings.

Overrides DevelGenerateBaseInterface::getSetting

7 calls to DevelGenerateBase::getSetting()
ContentDevelGenerate::settingsForm in devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php
Returns the form for the plugin.
ExampleDevelGenerate::settingsForm in devel_generate/tests/modules/devel_generate_example/src/Plugin/DevelGenerate/ExampleDevelGenerate.php
Returns the form for the plugin.
MenuDevelGenerate::settingsForm in devel_generate/src/Plugin/DevelGenerate/MenuDevelGenerate.php
Returns the form for the plugin.
MenuDevelGenerate::validateDrushParams in devel_generate/src/Plugin/DevelGenerate/MenuDevelGenerate.php
Responsible for validating Drush params.
TermDevelGenerate::settingsForm in devel_generate/src/Plugin/DevelGenerate/TermDevelGenerate.php
Returns the form for the plugin.

... See full list

File

devel_generate/src/DevelGenerateBase.php, line 41

Class

DevelGenerateBase
Provides a base DevelGenerate plugin implementation.

Namespace

Drupal\devel_generate

Code

public function getSetting($key) {

  // Merge defaults if we have no value for the key.
  if (!array_key_exists($key, $this->settings)) {
    $this->settings = $this
      ->getDefaultSettings();
  }
  return isset($this->settings[$key]) ? $this->settings[$key] : NULL;
}