Skip to content

Instantly share code, notes, and snippets.

@jacine
Last active April 19, 2016 17:45
Show Gist options
  • Save jacine/0361f9492af6c8d644630655be54b9f1 to your computer and use it in GitHub Desktop.
Save jacine/0361f9492af6c8d644630655be54b9f1 to your computer and use it in GitHub Desktop.
Theme Environment Settings
<?php
/**
* @file
* mytheme.theme
*/
use Drupal\Core\Site\Settings;
function mytheme_css_alter(&$css) {
$environent = Settings::get('theme_environment', NULL);
ksm($environent); // returns "development" Yay!
}
<?php
/**
* @file
* settings.local.php
*/
$settings['theme_environment'] = 'development';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment