function DevelGenerateBase::getSetting

Same name in other branches
  1. 5.x devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::getSetting()

Overrides DevelGenerateBaseInterface::getSetting

8 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.
MediaDevelGenerate::settingsForm in devel_generate/src/Plugin/DevelGenerate/MediaDevelGenerate.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.

... See full list

File

devel_generate/src/DevelGenerateBase.php, line 42

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 $this->settings[$key] ?? NULL;
}