InfoParser::parse

public function InfoParser::parse

public InfoParser::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:

  • name: The real name of the module for display purposes. (Required)
  • description: A brief description of the module.
  • type: whether it is for a module or theme. (Required)

Information stored in a module .info.yml file: