Created
April 29, 2015 04:09
-
-
Save xtfer/6f601c608154d32803b1 to your computer and use it in GitHub Desktop.
Config module usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Load the Config class. | |
$config = \Drupal\config\Config::load(); | |
// Supports JSON, PHP, and optionally YAML. Want XML? Its extensible. | |
$parser_type = CONFIG_PARSER_JSON; | |
// Get the Config. | |
return $config->getConfig('my_module_name', 'directory_within_module', 'file_within_directory.ext', $parser_type); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment