From a14717247fcd7aa3df684a5f7ea177a7b3b2ff6e Mon Sep 17 00:00:00 2001 From: Valentin Date: Sun, 29 Sep 2024 22:31:30 +0200 Subject: [PATCH] clean les tests de custom modules qui fonctionnaient pas --- config/sync/core.extension.yml | 1 - .../alter_routing/alter_routing.info.yml | 5 ---- .../custom/alter_routing/alter_routing.module | 26 ------------------- 3 files changed, 32 deletions(-) delete mode 100644 web/modules/custom/alter_routing/alter_routing.info.yml delete mode 100644 web/modules/custom/alter_routing/alter_routing.module diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index f9516b5..e14778a 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -7,7 +7,6 @@ module: admin_toolbar: 0 admin_toolbar_links_access_filter: 0 advanced_text_formatter: 0 - alter_routing: 0 audiofield: 0 autocomplete_deluxe: 0 ban: 0 diff --git a/web/modules/custom/alter_routing/alter_routing.info.yml b/web/modules/custom/alter_routing/alter_routing.info.yml deleted file mode 100644 index bf2f5d5..0000000 --- a/web/modules/custom/alter_routing/alter_routing.info.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: 'Alter Routing' -type: module -description: 'Custom module to alter routing and redirect node/2 to the homepage.' -core_version_requirement: ^8 || ^9 || ^10 -package: Custom diff --git a/web/modules/custom/alter_routing/alter_routing.module b/web/modules/custom/alter_routing/alter_routing.module deleted file mode 100644 index d2134fb..0000000 --- a/web/modules/custom/alter_routing/alter_routing.module +++ /dev/null @@ -1,26 +0,0 @@ -get('url'); - $front_page_node = \Drupal\node\Entity\Node::load(\Drupal::entityTypeManager()->getStorage('node')->getQuery() - ->condition('type', 'page') // Change this to the content type if needed - ->condition('status', 1) - ->sort('created', 'DESC') - ->execute() - ); - - // If front page content is found, replace node content with front page content. - if ($front_page_node) { - $view_builder = \Drupal::entityTypeManager()->getViewBuilder('node'); - $rendered_content = $view_builder->view($front_page_node, 'full'); - $page['content']['#markup'] = \Drupal::service('renderer')->render($rendered_content); - } - } -} -?> \ No newline at end of file