-
Romanos Dodopoulos authored
Remove centrally managed themes from the update manager. Related to DRUPAL-141.
Romanos Dodopoulos authoredRemove centrally managed themes from the update manager. Related to DRUPAL-141.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
cern_integration.module 1.06 KiB
<?php
function cern_integration_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
drupal_set_message(t("Form ID: $form_id"), "status");
}
/**
* Implements hook_update_projects_alter().
* Remove Drupal core as well as all centrally managed modules and themes from the Update manager.
*/
function cern_integration_update_projects_alter(&$projects)
{
// Remove Drupal core.
unset($projects['drupal']);
// Remove all centrally managed modules.
foreach (system_get_info("module") as $module_name => $module) {
if (preg_match('#^modules/#', drupal_get_path("module", $module_name))) {
if (isset($module["project"])){
unset($projects[$module["project"]]);
}
}
}
// Remove all centrally managed themes.
foreach (system_get_info("theme") as $theme_name => $theme) {
if (preg_match('#^themes/#', drupal_get_path("theme", $theme_name))) {
if (isset($theme["project"])){
unset($projects[$theme["project"]]);
}
}
}
}