You are here

protected function YamlFormWizardPage::getDefaultSettings in YAML Form 8

Get default from form or global settings.

Parameters

\Drupal\yamlform\YamlFormInterface $yamlform: A form.

string $name: The name of the setting.

Return value

string The setting's value.

1 call to YamlFormWizardPage::getDefaultSettings()
YamlFormWizardPage::form in src/Plugin/YamlFormElement/YamlFormWizardPage.php
Gets the actual configuration form array to be built.

File

src/Plugin/YamlFormElement/YamlFormWizardPage.php, line 99

Class

YamlFormWizardPage
Provides a 'yamlform_wizard_page' element.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

protected function getDefaultSettings(YamlFormInterface $yamlform, $name) {
  return $yamlform
    ->getSetting($name) ?: \Drupal::config('yamlform.settings')
    ->get("settings.default_{$name}");
}