function DevelGenerateBase::getSetting

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

Overrides DevelGenerateBaseInterface::getSetting

9 calls to DevelGenerateBase::getSetting()
BlockContentDevelGenerate::settingsForm in devel_generate/src/Plugin/DevelGenerate/BlockContentDevelGenerate.php
Returns the form for the plugin.
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.

... See full list

File

devel_generate/src/DevelGenerateBase.php, line 73

Class

DevelGenerateBase
Provides a base DevelGenerate plugin implementation.

Namespace

Drupal\devel_generate

Code

public function getSetting(string $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;
}