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 ...@@ -2,8 +2,6 @@ name: CERN Integration module
description: Custom functionality and constraints for CERN Drupal infrastructure description: Custom functionality and constraints for CERN Drupal infrastructure
package: CERN package: CERN
type: module type: module
version: '8.0.9' core_version_requirement: ^9 || ^10
core: 8.x version: 2.0.0
core_version_requirement: ^8 || ^9
required: TRUE required: TRUE
...@@ -44,16 +44,17 @@ function cern_integration_update_projects_alter(&$projects) ...@@ -44,16 +44,17 @@ function cern_integration_update_projects_alter(&$projects)
// Remove all centrally managed modules. // Remove all centrally managed modules.
foreach (\Drupal::service('extension.list.module')->getAllInstalledInfo() as $module_name => $module) { 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"])){ if (isset($module["project"])){
unset($projects[$module["project"]]); unset($projects[$module["project"]]);
} }
} }
} }
// Remove all centrally managed themes. // Remove all centrally managed themes.
foreach (\Drupal::service('extension.list.theme')->getAllInstalledInfo() as $theme_name => $theme) { 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"])){ if (isset($theme["project"])){
unset($projects[$theme["project"]]); unset($projects[$theme["project"]]);
} }
......
{ {
"name": "drupal/cern-integration", "name": "drupal/cern-integration",
"description": "Custom functionality and constraints for CERN Drupal infrastructure", "description": "Custom functionality and constraints for CERN Drupal infrastructure",
"version": "1.1.1", "version": "2.0.0",
"type": "drupal-custom-module", "type": "drupal-custom-module",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
"authors": [ "authors": [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment