Skip to content
Snippets Groups Projects
Commit 2606211b authored by Lorenzo Del Pianta's avatar Lorenzo Del Pianta :robot:
Browse files

replaced deprecated functions

parent ce21b6ee
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,6 @@ name: CERN Integration module
description: Custom functionality and constraints for CERN Drupal infrastructure
package: CERN
type: module
version: '8.0.9'
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: ^9 || ^10
version: 2.0.0
required: TRUE
......@@ -44,16 +44,17 @@ function cern_integration_update_projects_alter(&$projects)
// Remove all centrally managed modules.
foreach (\Drupal::service('extension.list.module')->getAllInstalledInfo() as $module_name => $module) {
if (preg_match('#^modules/#', drupal_get_path("module", $module_name))) {
if (preg_match('#^modules/#', \Drupal::service('extension.path.resolver')->getPath('module', $module_name))) {
if (isset($module["project"])){
unset($projects[$module["project"]]);
}
}
}
// Remove all centrally managed themes.
foreach (\Drupal::service('extension.list.theme')->getAllInstalledInfo() as $theme_name => $theme) {
if (preg_match('#^themes/#', drupal_get_path("theme", $theme_name))) {
if (preg_match('#^themes/#', \Drupal::service('extension.list.theme')->getPath($theme_name))) {
if (isset($theme["project"])){
unset($projects[$theme["project"]]);
}
......
{
"name": "drupal/cern-integration",
"description": "Custom functionality and constraints for CERN Drupal infrastructure",
"version": "1.1.1",
"version": "2.0.0",
"type": "drupal-custom-module",
"license": "GPL-2.0-or-later",
"authors": [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment