public InfoParserInterface::parse($filename)
Parses Drupal module, theme and profile .info.yml files.
Info files are NOT for placing arbitrary theme and module-specific settings. Use Config::get() and Config::set()->save() for that. Info files are formatted as YAML. If the 'version' key is set to 'VERSION' in any info file, then the value will be substituted with the current version of Drupal core.
Information stored in all .info.yml files:
Information stored in a module .info.yml file:
See forum.info.yml for an example of a module .info.yml file.
Information stored in a theme .info.yml file:
See bartik.info.yml for an example of a theme .info.yml file.
string $filename: The file we are parsing. Accepts file with relative or absolute path.
array The info array.
\Drupal\Core\Extension\InfoParserException Exception thrown if there is a parsing error or the .info.yml file does not contain a required key.
public function parse($filename);
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Extension!InfoParserInterface.php/function/InfoParserInterface::parse/8.1.x