41691cd9be990cd7cc44bb2e2597bab10b359aa3
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / update_projects_alter.twig
1 /**
2  * Implements hook_update_projects_alter().
3  */
4 function {{ machine_name }}_update_projects_alter(&$projects) {
5   // Hide a site-specific module from the list.
6   unset($projects['site_specific_module']);
7
8   // Add a disabled module to the list.
9   // The key for the array should be the machine-readable project "short name".
10   $projects['disabled_project_name'] = [
11     // Machine-readable project short name (same as the array key above).
12     'name' => 'disabled_project_name',
13     // Array of values from the main .info.yml file for this project.
14     'info' => [
15       'name' => 'Some disabled module',
16       'description' => 'A module not enabled on the site that you want to see in the available updates report.',
17       'version' => '8.x-1.0',
18       'core' => '8.x',
19       // The maximum file change time (the "ctime" returned by the filectime()
20       // PHP method) for all of the .info.yml files included in this project.
21       '_info_file_ctime' => 1243888165,
22     ],
23     // The date stamp when the project was released, if known. If the disabled
24     // project was an officially packaged release from drupal.org, this will
25     // be included in the .info.yml file as the 'datestamp' field. This only
26     // really matters for development snapshot releases that are regenerated,
27     // so it can be left undefined or set to 0 in most cases.
28     'datestamp' => 1243888185,
29     // Any modules (or themes) included in this project. Keyed by machine-
30     // readable "short name", value is the human-readable project name printed
31     // in the UI.
32     'includes' => [
33       'disabled_project' => 'Disabled module',
34       'disabled_project_helper' => 'Disabled module helper module',
35       'disabled_project_foo' => 'Disabled module foo add-on module',
36     ],
37     // Does this project contain a 'module', 'theme', 'disabled-module', or
38     // 'disabled-theme'?
39     'project_type' => 'disabled-module',
40   ];
41 }