Skip to content

Instantly share code, notes, and snippets.

@QuentinFonteneau
Last active September 19, 2018 08:38
Show Gist options
  • Save QuentinFonteneau/005a067e0164d0caf2cae074cdd9547b to your computer and use it in GitHub Desktop.
Save QuentinFonteneau/005a067e0164d0caf2cae074cdd9547b to your computer and use it in GitHub Desktop.
[Drupal 8] Get config from settings.php
// In your settings.php (or custom_settings.php)
$config['system.maintenance']['message']['sorry'] = 'Sorry, our site is down now.';
// To retrieve this config in PHP, do this :
\Drupal::config('system.maintenance')->get('message')['sorry'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment