By editor, 15 June, 2021 Question How to use Drupal\Core\Site\Settings; Drupal settings file can contains variable which can use to use for different configuration in different environments. Example: env_name default_info_nid $settings['env_name'] = 'Local'; $settings['default_info_nid'] = 1'; Read the settings use Drupal\Core\Site\Settings; $envName = Settings::get('env_name'); $nid = Settings::get('default_info_nid'); Tags Drupal 8 Code Settings Drupal 8 Module Settings and Mapping Comments You must have JavaScript enabled to use this form. Your name Subject Comment About text formats Text format Plain textBasic_html Plain text No HTML tags allowed. Lines and paragraphs break automatically. Web page addresses and email addresses turn into links automatically.
Comments