Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Extension/InfoParserInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Core\Extension; | |
4 | |
5 /** | |
6 * Interface for classes that parses Drupal's info.yml files. | |
7 */ | |
8 interface InfoParserInterface { | |
9 | |
10 /** | |
11 * Parses Drupal module, theme and profile .info.yml files. | |
12 * | |
13 * Info files are NOT for placing arbitrary theme and module-specific | |
14 * settings. Use Config::get() and Config::set()->save() for that. Info files | |
15 * are formatted as YAML. If the 'version' key is set to 'VERSION' in any info | |
16 * file, then the value will be substituted with the current version of Drupal | |
17 * core. | |
18 * | |
19 * Information stored in all .info.yml files: | |
20 * - name: The real name of the module for display purposes. (Required) | |
21 * - description: A brief description of the module. | |
22 * - type: whether it is for a module or theme. (Required) | |
23 * | |
24 * Information stored in a module .info.yml file: | |
25 * - dependencies: An array of dependency strings. Each is in the form | |
26 * 'project:module (versions)'; with the following meanings: | |
27 * - project: (optional) Project shortname, recommended to ensure | |
28 * uniqueness, if the module is part of a project hosted on drupal.org. | |
29 * If omitted, also omit the : that follows. The project name is currently | |
30 * ignored by Drupal core but is used for automated testing. | |
31 * - module: (required) Module shortname within the project. | |
32 * - (versions): Version information, consisting of one or more | |
33 * comma-separated operator/value pairs or simply version numbers, which | |
34 * can contain "x" as a wildcard. Examples: (>=8.22, <8.28), (8.x-3.x). | |
35 * - package: The name of the package of modules this module belongs to. | |
36 * | |
37 * See forum.info.yml for an example of a module .info.yml file. | |
38 * | |
39 * Information stored in a theme .info.yml file: | |
40 * - screenshot: Path to screenshot relative to the theme's .info.yml file. | |
41 * - engine: Theme engine; typically twig. | |
42 * - base theme: Name of a base theme, if applicable. | |
43 * - regions: Listed regions. | |
44 * - features: Features available. | |
45 * - stylesheets: Theme stylesheets. | |
46 * - scripts: Theme scripts. | |
47 * | |
48 * See bartik.info.yml for an example of a theme .info.yml file. | |
49 * | |
50 * @param string $filename | |
51 * The file we are parsing. Accepts file with relative or absolute path. | |
52 * | |
53 * @return array | |
54 * The info array. | |
55 * | |
56 * @throws \Drupal\Core\Extension\InfoParserException | |
57 * Exception thrown if there is a parsing error or the .info.yml file does | |
58 * not contain a required key. | |
59 */ | |
60 public function parse($filename); | |
61 | |
62 } |