Procházet zdrojové kódy

upgraded custom modules D10 compatibility

bach před 2 měsíci
rodič
revize
ffc5fac46f
35 změnil soubory, kde provedl 68 přidání a 67 odebrání
  1. 1 1
      web/modules/custom/edlp_admin/edlp_admin.info.yml
  2. 1 1
      web/modules/custom/edlp_agenda/edlp_agenda.info.yml
  3. 3 3
      web/modules/custom/edlp_agenda/src/Controller/AgendaController.php
  4. 1 1
      web/modules/custom/edlp_ajax/edlp_ajax.info.yml
  5. 1 1
      web/modules/custom/edlp_ajax/edlp_ajax.module
  6. 4 4
      web/modules/custom/edlp_ajax/src/Controller/EdlpAjaxController.php
  7. 1 1
      web/modules/custom/edlp_corpus/edlp_corpus.info.yml
  8. 1 1
      web/modules/custom/edlp_corpus/includes/blockentrees.inc
  9. 1 1
      web/modules/custom/edlp_corpus/includes/edlp_corpus_collection.inc
  10. 13 13
      web/modules/custom/edlp_corpus/src/Controller/CorpusController.php
  11. 1 1
      web/modules/custom/edlp_corpus/src/Plugin/Filter/AudioLinksFilter.php
  12. 1 1
      web/modules/custom/edlp_fils/edlp_fils.info.yml
  13. 1 1
      web/modules/custom/edlp_fils/src/Controller/FilsController.php
  14. 1 1
      web/modules/custom/edlp_home/edlp_home.info.yml
  15. 5 5
      web/modules/custom/edlp_home/includes/edlp_home.inc
  16. 3 3
      web/modules/custom/edlp_home/src/Controller/HomeController.php
  17. 1 1
      web/modules/custom/edlp_mobile/edlp_mobile.info.yml
  18. 1 1
      web/modules/custom/edlp_productions/edlp_productions.info.yml
  19. 3 3
      web/modules/custom/edlp_productions/src/Controller/ProductionsController.php
  20. 1 1
      web/modules/custom/edlp_search/edlp_search.info.yml
  21. 3 3
      web/modules/custom/edlp_search/src/Controller/EdlpSearchController.php
  22. 1 1
      web/modules/custom/edlp_studio/edlp_studio.info.yml
  23. 2 1
      web/modules/custom/edlp_studio/edlp_studio.libraries.yml
  24. 1 1
      web/modules/custom/edlp_studio/includes/edlp_chutier_ui.inc
  25. 1 1
      web/modules/custom/edlp_studio/src/Controller/ChutierController.php
  26. 3 3
      web/modules/custom/edlp_studio/src/Controller/CompositionController.php
  27. 3 3
      web/modules/custom/edlp_studio/src/Controller/StudioUIController.php
  28. 1 1
      web/themes/custom/edlptheme/edlptheme.info.yml
  29. 1 1
      web/themes/custom/edlptheme/edlptheme.libraries.yml
  30. 2 2
      web/themes/custom/edlptheme/edlptheme.theme
  31. 1 1
      web/themes/custom/edlptheme/templates/content/node--enregistrement--docsindex.html.twig
  32. 1 1
      web/themes/custom/edlptheme/templates/content/node--enregistrement--index-home.html.twig
  33. 1 1
      web/themes/custom/edlptheme/templates/content/node--enregistrement--lastdocs.html.twig
  34. 1 1
      web/themes/custom/edlptheme/templates/content/node--enregistrement--player-cartel.html.twig
  35. 1 1
      web/themes/custom/edlptheme/templates/content/node--enregistrement--search-index.html.twig

+ 1 - 1
web/modules/custom/edlp_admin/edlp_admin.info.yml

@@ -10,5 +10,5 @@
 name: Edlp Admin
 type: module
 description: Admin helpers for edlp d8.
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 package: Edlp

+ 1 - 1
web/modules/custom/edlp_agenda/edlp_agenda.info.yml

@@ -1,7 +1,7 @@
 name: Edlp Agenda
 type: module
 description: Manage agenda for edlp d8.
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 package: Edlp
 # dependencies:
 #   - migrate_drupal

+ 3 - 3
web/modules/custom/edlp_agenda/src/Controller/AgendaController.php

@@ -74,11 +74,11 @@ class AgendaController extends ControllerBase {
   public function agendajson() {
 
     $renderable = $this->toRenderable();
-    // $rendered = render($renderable);
+    // $rendered = \Drupal::service('renderer')->render($renderable);
     // We can't render directly the entity as it throw an exception with cachable data
     //http://blog.dcycle.com/blog/2018-01-24/caching-drupal-8-rest-resource/#the-dreaded-leaked-metadata-error
     $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($renderable) {
-      return render($renderable);
+      return \Drupal::service('renderer')->render($renderable);
     });
 
     $data = [
@@ -98,7 +98,7 @@ class AgendaController extends ControllerBase {
         '#attributes' => ['class' => ["language-switcher-{$links->method_id}",],],
         '#set_active_class' => TRUE,
       ];
-      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return render($translations_build);});
+      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return \Drupal::service('renderer')->render($translations_build);});
 
       $data['translations_links'] = $translations_rendered;
     }

+ 1 - 1
web/modules/custom/edlp_ajax/edlp_ajax.info.yml

@@ -7,5 +7,5 @@
 name: Edlp Ajax
 type: module
 description: Manage ajax entity loading for edlp d8.
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 package: Edlp

+ 1 - 1
web/modules/custom/edlp_ajax/edlp_ajax.module

@@ -40,7 +40,7 @@ function edlp_ajax_page_attachments(array &$attachments) {
         if($audio_fid){
           $audio_file = \Drupal\file\Entity\File::load($audio_fid);
           $son_uri = $audio_file->getFileUri();
-          $audio_url = file_create_url($son_uri);
+          $audio_url = \Drupal::service('file_url_generator')->generateAbsoluteString($son_uri);
         }
       }
       break;

+ 4 - 4
web/modules/custom/edlp_ajax/src/Controller/EdlpAjaxController.php

@@ -169,11 +169,11 @@ class EdlpAjaxController extends ControllerBase {
     $this->viewmode = $viewmode;
 
     $renderable = $this->toRenderable();
-    // $rendered = render($renderable);
+    // $rendered = \Drupal::service('renderer')->render($renderable);
     // We can't render directly the entity as it throw an exception with cachable data
     // see http://blog.dcycle.com/blog/2018-01-24/caching-drupal-8-rest-resource/#the-dreaded-leaked-metadata-error
     $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($renderable) {
-      return render($renderable);
+      return \Drupal::service('renderer')->render($renderable);
     });
 
     $title = $this->title;
@@ -231,7 +231,7 @@ class EdlpAjaxController extends ControllerBase {
         '#attributes' => ['class' => ["language-switcher-{$links->method_id}"]],
         '#set_active_class' => TRUE,
       ];
-      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return render($translations_build);});
+      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return \Drupal::service('renderer')->render($translations_build);});
       // dpm($links);
       $data['translations_links'] = $translations_rendered;
     }
@@ -304,7 +304,7 @@ class EdlpAjaxController extends ControllerBase {
       $block = Block::load($id);
       $block_render = $block_viewbuilder->view($block);
       $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($block_render) {
-        return render($block_render);
+        return \Drupal::service('renderer')->render($block_render);
       });
       $blocks[$id] = array(
         'rendered'=> $rendered,

+ 1 - 1
web/modules/custom/edlp_corpus/edlp_corpus.info.yml

@@ -1,5 +1,5 @@
 name: Edlp Corpus
 type: module
 description: Creates interactive map of corpus for edlp d8.
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 package: Edlp

+ 1 - 1
web/modules/custom/edlp_corpus/includes/blockentrees.inc

@@ -59,6 +59,6 @@ function template_preprocess_blockentrees(&$vars){
     $entrees['#items'][] = $entree;
   }
 
-  $vars['entrees'] = render($entrees);
+  $vars['entrees'] = \Drupal::service('renderer')->render($entrees);
 
 }

+ 1 - 1
web/modules/custom/edlp_corpus/includes/edlp_corpus_collection.inc

@@ -23,7 +23,7 @@ function template_preprocess_edlp_corpus_collection(&$vars){
     foreach($vars['entrees_terms'] as $term){
       $entrees['list']['#items'][] = $term_view_builder->view($term, 'home_mobile');
     }
-    $vars['entrees'] = render($entrees);
+    $vars['entrees'] = \Drupal::service('renderer')->render($entrees);
   }
 
 }

+ 13 - 13
web/modules/custom/edlp_corpus/src/Controller/CorpusController.php

@@ -82,7 +82,7 @@ class CorpusController extends ControllerBase {
       if(!$audio_file) continue;
 
       $son_uri = $audio_file->getFileUri();
-      $audio_url = file_create_url($son_uri);
+      $audio_url = \Drupal::service('file_url_generator')->generateAbsoluteString($son_uri);
 
       // has article ?
       $article_value = $node->body->getValue();
@@ -233,11 +233,11 @@ class CorpusController extends ControllerBase {
   public function docsindexjson() {
 
       $renderable = $this->docsindexToRenderable();
-      // $rendered = render($renderable);
+      // $rendered = \Drupal::service('renderer')->render($renderable);
       // We can't render directly the entity as it throw an exception with cachable data
       //http://blog.dcycle.com/blog/2018-01-24/caching-drupal-8-rest-resource/#the-dreaded-leaked-metadata-error
       $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($renderable) {
-        return render($renderable);
+        return \Drupal::service('renderer')->render($renderable);
       });
 
       $data = [
@@ -256,7 +256,7 @@ class CorpusController extends ControllerBase {
           '#attributes' => ['class' => ["language-switcher-{$links->method_id}",],],
           '#set_active_class' => TRUE,
         ];
-        $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return render($translations_build);});
+        $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return \Drupal::service('renderer')->render($translations_build);});
 
         $data['translations_links'] = $translations_rendered;
       }
@@ -345,11 +345,11 @@ class CorpusController extends ControllerBase {
   public function lastdocsjson() {
 
     $renderable = $this->toRenderable();
-    // $rendered = render($renderable);
+    // $rendered = \Drupal::service('renderer')->render($renderable);
     // We can't render directly the entity as it throw an exception with cachable data
     //http://blog.dcycle.com/blog/2018-01-24/caching-drupal-8-rest-resource/#the-dreaded-leaked-metadata-error
     $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($renderable) {
-      return render($renderable);
+      return \Drupal::service('renderer')->render($renderable);
     });
 
     $data = [
@@ -370,7 +370,7 @@ class CorpusController extends ControllerBase {
         '#attributes' => ['class' => ["language-switcher-{$links->method_id}",],],
         '#set_active_class' => TRUE,
       ];
-      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return render($translations_build);});
+      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return \Drupal::service('renderer')->render($translations_build);});
 
       $data['translations_links'] = $translations_rendered;
     }
@@ -458,11 +458,11 @@ class CorpusController extends ControllerBase {
   public function articlesindexjson() {
 
     $renderable = $this->articlesToRenderable();
-    // $rendered = render($renderable);
+    // $rendered = \Drupal::service('renderer')->render($renderable);
     // We can't render directly the entity as it throw an exception with cachable data
     //http://blog.dcycle.com/blog/2018-01-24/caching-drupal-8-rest-resource/#the-dreaded-leaked-metadata-error
     $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($renderable) {
-      return render($renderable);
+      return \Drupal::service('renderer')->render($renderable);
     });
 
     $data = [
@@ -484,7 +484,7 @@ class CorpusController extends ControllerBase {
         '#attributes' => ['class' => ["language-switcher-{$links->method_id}",],],
         '#set_active_class' => TRUE,
       ];
-      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return render($translations_build);});
+      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return \Drupal::service('renderer')->render($translations_build);});
 
       $data['translations_links'] = $translations_rendered;
     }
@@ -557,11 +557,11 @@ class CorpusController extends ControllerBase {
 
   public function collectionjson(){
     $renderable = $this->collectionToRenderable();
-    // $rendered = render($renderable);
+    // $rendered = \Drupal::service('renderer')->render($renderable);
     // We can't render directly the entity as it throw an exception with cachable data
     //http://blog.dcycle.com/blog/2018-01-24/caching-drupal-8-rest-resource/#the-dreaded-leaked-metadata-error
     $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($renderable) {
-      return render($renderable);
+      return \Drupal::service('renderer')->render($renderable);
     });
 
     $data = [
@@ -581,7 +581,7 @@ class CorpusController extends ControllerBase {
         '#attributes' => ['class' => ["language-switcher-{$links->method_id}",],],
         '#set_active_class' => TRUE,
       ];
-      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return render($translations_build);});
+      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return \Drupal::service('renderer')->render($translations_build);});
 
       $data['translations_links'] = $translations_rendered;
     }

+ 1 - 1
web/modules/custom/edlp_corpus/src/Plugin/Filter/AudioLinksFilter.php

@@ -51,7 +51,7 @@ class AudioLinksFilter extends FilterBase {
       $son_url = null;
       if($son_file){
         $son_uri = $son_file->getFileUri();
-        $son_url = file_create_url($son_uri);
+        $son_url = \Drupal::service('file_url_generator')->generateAbsoluteString($son_uri);
       }
       // set the link classes
       $class = $link->getAttribute('class');

+ 1 - 1
web/modules/custom/edlp_fils/edlp_fils.info.yml

@@ -10,5 +10,5 @@
 name: Edlp Fils
 type: module
 description: Manage fils for edlp d8.
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 package: Edlp

+ 1 - 1
web/modules/custom/edlp_fils/src/Controller/FilsController.php

@@ -31,7 +31,7 @@ class FilsController extends ControllerBase {
     $renderable = array(
       "#markup"=>"Edlp Fils"
     );
-    $rendered = render($renderable);
+    $rendered = \Drupal::service('renderer')->render($renderable);
 
     $response->setData([
       'test'=>'hello',

+ 1 - 1
web/modules/custom/edlp_home/edlp_home.info.yml

@@ -10,7 +10,7 @@
 name: Edlp Home
 type: module
 description: Manage home for edlp d8.
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 package: Edlp
 # dependencies:
 #   - migrate_drupal

+ 5 - 5
web/modules/custom/edlp_home/includes/edlp_home.inc

@@ -109,7 +109,7 @@ function template_preprocess_edlp_home(&$vars){
     foreach($vars['lastdocs_items'] as $node){
       $lastdocs['list']['#items'][] = $node_view_builder->view($node, 'search_index');
     }
-    $vars['lastdocs'] = render($lastdocs);
+    $vars['lastdocs'] = \Drupal::service('renderer')->render($lastdocs);
   }
 
   // render the next events of agenda as list
@@ -152,7 +152,7 @@ function template_preprocess_edlp_home(&$vars){
     foreach($vars['agenda_items'] as $node){
       $agenda['list']['#items'][] = $node_view_builder->view($node, 'teaser');
     }
-    $vars['agenda'] = render($agenda);
+    $vars['agenda'] = \Drupal::service('renderer')->render($agenda);
   }
 
   if(isset($vars['collection_link'])){
@@ -172,7 +172,7 @@ function template_preprocess_edlp_home(&$vars){
         )
       )
     );
-    $vars['collection_link_rendered'] = render($collection);
+    $vars['collection_link_rendered'] = \Drupal::service('renderer')->render($collection);
   }
 
   if(isset($vars['production_link'])){
@@ -192,7 +192,7 @@ function template_preprocess_edlp_home(&$vars){
         )
       )
     );
-    $vars['production_link_rendered'] = render($production);
+    $vars['production_link_rendered'] = \Drupal::service('renderer')->render($production);
   }
 
   if(isset($vars['agenda_link'])){
@@ -212,7 +212,7 @@ function template_preprocess_edlp_home(&$vars){
         )
       )
     );
-    $vars['agenda_link_rendered'] = render($agenda);
+    $vars['agenda_link_rendered'] = \Drupal::service('renderer')->render($agenda);
   }
 
 }

+ 3 - 3
web/modules/custom/edlp_home/src/Controller/HomeController.php

@@ -225,11 +225,11 @@ class HomeController extends ControllerBase {
   public function home_mobilejson() {
 
     $renderable = $this->toMobileHomeRenderable();
-    // $rendered = render($renderable);
+    // $rendered = \Drupal::service('renderer')->render($renderable);
     // We can't render directly the entity as it throw an exception with cachable data
     //http://blog.dcycle.com/blog/2018-01-24/caching-drupal-8-rest-resource/#the-dreaded-leaked-metadata-error
     $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($renderable) {
-      return render($renderable);
+      return \Drupal::service('renderer')->render($renderable);
     });
 
     $data = [
@@ -249,7 +249,7 @@ class HomeController extends ControllerBase {
         '#attributes' => ['class' => ["language-switcher-{$links->method_id}",],],
         '#set_active_class' => TRUE,
       ];
-      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return render($translations_build);});
+      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return \Drupal::service('renderer')->render($translations_build);});
 
       $data['translations_links'] = $translations_rendered;
     }

+ 1 - 1
web/modules/custom/edlp_mobile/edlp_mobile.info.yml

@@ -1,7 +1,7 @@
 name: 'edlp_mobile'
 type: module
 description: 'Handle some mobile behaviours'
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 package: 'Edlp'
 dependencies:
   - domain

+ 1 - 1
web/modules/custom/edlp_productions/edlp_productions.info.yml

@@ -10,7 +10,7 @@
 name: Edlp Productions
 type: module
 description: Manage productions for edlp d8.
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 package: Edlp
 # dependencies:
 #   - migrate_drupal

+ 3 - 3
web/modules/custom/edlp_productions/src/Controller/ProductionsController.php

@@ -87,11 +87,11 @@ class ProductionsController extends ControllerBase {
   public function productionsjson() {
 
     $renderable = $this->toRenderable();
-    // $rendered = render($renderable);
+    // $rendered = \Drupal::service('renderer')->render($renderable);
     // We can't render directly the entity as it throw an exception with cachable data
     // see http://blog.dcycle.com/blog/2018-01-24/caching-drupal-8-rest-resource/#the-dreaded-leaked-metadata-error
     $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($renderable) {
-      return render($renderable);
+      return \Drupal::service('renderer')->render($renderable);
     });
 
     // add menu production block
@@ -121,7 +121,7 @@ class ProductionsController extends ControllerBase {
         '#attributes' => ['class' => ["language-switcher-{$links->method_id}",],],
         '#set_active_class' => TRUE,
       ];
-      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return render($translations_build);});
+      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return \Drupal::service('renderer')->render($translations_build);});
 
       $data ['translations_links'] = $translations_rendered;
     }

+ 1 - 1
web/modules/custom/edlp_search/edlp_search.info.yml

@@ -1,7 +1,7 @@
 name: 'edlp_search'
 type: module
 description: 'Edlp search module'
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 package: Edlp
 dependencies:
   - search_api

+ 3 - 3
web/modules/custom/edlp_search/src/Controller/EdlpSearchController.php

@@ -75,7 +75,7 @@ class EdlpSearchController extends ControllerBase {
   public function searchFormJson(){
     $this->buildRenderable();
 
-    $rendered = render($this->renderable);
+    $rendered = \Drupal::service('renderer')->render($this->renderable);
     $data = [
       'rendered' => $rendered,
       'title' => 'Search',
@@ -91,7 +91,7 @@ class EdlpSearchController extends ControllerBase {
         '#attributes' => ['class' => ["language-switcher-{$links->method_id}",],],
         '#set_active_class' => TRUE,
       ];
-      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return render($translations_build);});
+      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return \Drupal::service('renderer')->render($translations_build);});
 
       $data['translations_links'] = $translations_rendered;
     }
@@ -247,7 +247,7 @@ class EdlpSearchController extends ControllerBase {
     $this->getRequestSearchArgs();
 
     $renderable = $this->getrenderable();
-    $rendered = render($renderable);
+    $rendered = \Drupal::service('renderer')->render($renderable);
 
     // build an array of results's nids
     $results_nids = [];

+ 1 - 1
web/modules/custom/edlp_studio/edlp_studio.info.yml

@@ -1,7 +1,7 @@
 name: 'Edlp Studio'
 type: module
 description: 'Edlp module that handle chutier and Compositions entities'
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 package: Edlp
 dependencies:
   # - entity_reference

+ 2 - 1
web/modules/custom/edlp_studio/edlp_studio.libraries.yml

@@ -3,8 +3,9 @@ edlp_studio-library:
     assets/dist/scripts/edlp_studio.min.js: { scope: footer }
   dependencies:
     - core/drupalSettings
+    - core/once
     - core/jquery
-    - core/jquery.once
+    # - core/jquery.once
     - jquery_ui_draggable/jquery_ui_draggable
     - jquery_ui_droppable/jquery_ui_droppable
     - jquery_ui_sortable/jquery_ui_sortable

+ 1 - 1
web/modules/custom/edlp_studio/includes/edlp_chutier_ui.inc

@@ -23,7 +23,7 @@ function template_preprocess_edlp_chutier_ui(&$vars){
     $son_url = null;
     if($son_file){
       $son_uri = $son_file->getFileUri();
-      $son_url = file_create_url($son_uri);
+      $son_url = \Drupal::service('file_url_generator')->generateAbsoluteString($son_uri);
     }
     // get the title
     $title = $node->getTitle();

+ 1 - 1
web/modules/custom/edlp_studio/src/Controller/ChutierController.php

@@ -85,7 +85,7 @@ class ChutierController extends ControllerBase {
         )
       )
     );
-    $new_link = render($new_link_build);
+    $new_link = \Drupal::service('renderer')->render($new_link_build);
 
     if($status == 'error'){
       $message = $this->error_message;

+ 3 - 3
web/modules/custom/edlp_studio/src/Controller/CompositionController.php

@@ -135,8 +135,8 @@ class CompositionController extends ControllerBase {
 
           $data += array(
             'new_name' => $title,
-            'new_link' => render($new_link_build),
-            'delete_link' => render($deletelink_build),
+            'new_link' =>\Drupal::service('renderer')->render($new_link_build),
+            'delete_link' =>\Drupal::service('renderer')->render($deletelink_build),
           );
           break;
         case 'open':
@@ -177,7 +177,7 @@ class CompositionController extends ControllerBase {
   private function getRendredComposition(){
     $view_builder = \Drupal::entityTypeManager()->getViewBuilder('composition');
     $compobuild = $view_builder->view($this->compo, 'studio_ui');
-    $this->rendered_compo = render($compobuild);
+    $this->rendered_compo = \Drupal::service('renderer')->render($compobuild);
   }
 
   private function openComposition($cid){

+ 3 - 3
web/modules/custom/edlp_studio/src/Controller/StudioUIController.php

@@ -62,7 +62,7 @@ class StudioUIController extends ControllerBase {
    */
   public function StudioUIJson() {
     $renderable = $this->buildStudioUI();
-    $rendered = render($renderable);
+    $rendered = \Drupal::service('renderer')->render($renderable);
 
     $data = ['rendered'=>$rendered];
 
@@ -78,7 +78,7 @@ class StudioUIController extends ControllerBase {
         '#attributes' => ['class' => ["language-switcher-{$links->method_id}",],],
         '#set_active_class' => TRUE,
       ];
-      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return render($translations_build);});
+      $translations_rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($translations_build) {return \Drupal::service('renderer')->render($translations_build);});
 
       $data['translations_links'] = $translations_rendered;
     }
@@ -92,7 +92,7 @@ class StudioUIController extends ControllerBase {
 
   public function StudioChutierUIJson(){
     $renderable = $this->buildChutierUI();
-    $rendered = render($renderable);
+    $rendered = \Drupal::service('renderer')->render($renderable);
     // TODO: make response cachable
     // JSON
     $response = new JsonResponse();

+ 1 - 1
web/themes/custom/edlptheme/edlptheme.info.yml

@@ -2,7 +2,7 @@ name: edlp
 description: 'EDLP Drupal 8 theme with gulp'
 type: theme
 base theme: classy
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 libraries:
   - core/normalize
   - edlptheme/redirect-js

+ 1 - 1
web/themes/custom/edlptheme/edlptheme.libraries.yml

@@ -8,7 +8,7 @@ redirect-js:
   version: VERSION
   header: true
   js:
-    assets/dist/scripts/redirect.min.js: { weight:-998, preprocess: false, minified: true }
+    assets/dist/scripts/redirect.min.js: { weight: -998, preprocess: false, minified: true }
 
 global-js:
   version: VERSION

+ 2 - 2
web/themes/custom/edlptheme/edlptheme.theme

@@ -199,7 +199,7 @@ function edlptheme_prepare_audio_link(&$vars){
   $son_url = null;
   if($son_file){
     $son_uri = $son_file->getFileUri();
-    $son_url = file_create_url($son_uri);
+    $son_url = \Drupal::service('file_url_generator')->generateAbsoluteString($son_uri);
   }
 
   $vars['link_attributes'] = new Attribute(array(
@@ -264,7 +264,7 @@ function edlptheme_preprocess_node__enregistrement__player_cartel(&$vars){
   $son_file = \Drupal\file\Entity\File::load($son_fid);
   if($son_file){
     $son_uri = $son_file->getFileUri();
-    $son_url = file_create_url($son_uri);
+    $son_url = \Drupal::service('file_url_generator')->generateAbsoluteString($son_uri);
 
     $base = log($son_file->getSize(), 1024);
     $suffixes = array('', 'K', 'M', 'G', 'T');

+ 1 - 1
web/themes/custom/edlptheme/templates/content/node--enregistrement--docsindex.html.twig

@@ -91,7 +91,7 @@
     </h2>
     <div class="entrees">
       {# THIS IS REALLY DIRTY !! #}
-      {% for key, child in content.field_entrees if key|first != '#' %}
+      {% for key, child in content.field_entrees|filter((value, key) => key|first != '#') %}
         {% set tid = child['#cache']['tags'][0]|replace({'taxonomy_term:':''}) %}
         <span class="entree" tid="{{ tid }}" title="{{ child }}"></span>
       {% endfor %}

+ 1 - 1
web/themes/custom/edlptheme/templates/content/node--enregistrement--index-home.html.twig

@@ -84,7 +84,7 @@
 <article{{ attributes.addClass(classes) }}>
   <div class="entrees">
     {# THIS IS REALLY DIRTY !! #}
-    {% for key, child in content.field_entrees if key|first != '#' %}
+    {% for key, child in content.field_entrees|filter((value, key) => key|first != '#') %}
       {% set tid = child['#cache']['tags'][0]|replace({'taxonomy_term:':''}) %}
       <span class="entree" tid="{{ tid }}" title="{{ child }}"></span>
     {% endfor %}

+ 1 - 1
web/themes/custom/edlptheme/templates/content/node--enregistrement--lastdocs.html.twig

@@ -84,7 +84,7 @@
 <article{{ attributes.addClass(classes) }}>
   <div class="entrees">
     {# THIS IS REALLY DIRTY !! #}
-    {% for key, child in content.field_entrees if key|first != '#' %}
+    {% for key, child in content.field_entrees|filter((value, key) => key|first != '#') %}
       {% set tid = child['#cache']['tags'][0]|replace({'taxonomy_term:':''}) %}
       <span class="entree" tid="{{ tid }}" title="{{ child }}"></span>
     {% endfor %}

+ 1 - 1
web/themes/custom/edlptheme/templates/content/node--enregistrement--player-cartel.html.twig

@@ -91,7 +91,7 @@
     <section class="first-cartel">
       <div class="entrees">
         {# THIS IS REALLY DIRTY !! #}
-        {% for key, child in content.field_entrees if key|first != '#' %}
+        {% for key, child in content.field_entrees|filter((value, key) => key|first != '#') %}
           {% set tid = child['#cache']['tags'][0]|replace({'taxonomy_term:':''}) %}
           <span class="entree" tid="{{ tid }}" title="{{ child }}"></span>
         {% endfor %}

+ 1 - 1
web/themes/custom/edlptheme/templates/content/node--enregistrement--search-index.html.twig

@@ -84,7 +84,7 @@
 <article{{ attributes.addClass(classes) }}>
   <div class="entrees">
     {# THIS IS REALLY DIRTY !! #}
-    {% for key, child in content.field_entrees if key|first != '#' %}
+    {% for key, child in content.field_entrees|filter((value, key) => key|first != '#') %}
       {% set tid = child['#cache']['tags'][0]|replace({'taxonomy_term:':''}) %}
       <span class="entree" tid="{{ tid }}" title="{{ child }}"></span>
     {% endfor %}