X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd7%2Fhook%2Fupdate_projects_alter.twig;fp=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd7%2Fhook%2Fupdate_projects_alter.twig;h=b2bd0d3e42957f1a07f3808cb3e88e92a2d72dca;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/update_projects_alter.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/update_projects_alter.twig new file mode 100644 index 000000000..b2bd0d3e4 --- /dev/null +++ b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/update_projects_alter.twig @@ -0,0 +1,41 @@ +/** + * Implements hook_update_projects_alter(). + */ +function {{ machine_name }}_update_projects_alter(&$projects) { + // Hide a site-specific module from the list. + unset($projects['site_specific_module']); + + // Add a disabled module to the list. + // The key for the array should be the machine-readable project "short name". + $projects['disabled_project_name'] = array( + // Machine-readable project short name (same as the array key above). + 'name' => 'disabled_project_name', + // Array of values from the main .info file for this project. + 'info' => array( + 'name' => 'Some disabled module', + 'description' => 'A module not enabled on the site that you want to see in the available updates report.', + 'version' => '7.x-1.0', + 'core' => '7.x', + // The maximum file change time (the "ctime" returned by the filectime() + // PHP method) for all of the .info files included in this project. + '_info_file_ctime' => 1243888165, + ), + // The date stamp when the project was released, if known. If the disabled + // project was an officially packaged release from drupal.org, this will + // be included in the .info file as the 'datestamp' field. This only + // really matters for development snapshot releases that are regenerated, + // so it can be left undefined or set to 0 in most cases. + 'datestamp' => 1243888185, + // Any modules (or themes) included in this project. Keyed by machine- + // readable "short name", value is the human-readable project name printed + // in the UI. + 'includes' => array( + 'disabled_project' => 'Disabled module', + 'disabled_project_helper' => 'Disabled module helper module', + 'disabled_project_foo' => 'Disabled module foo add-on module', + ), + // Does this project contain a 'module', 'theme', 'disabled-module', or + // 'disabled-theme'? + 'project_type' => 'disabled-module', + ); +}