edlp_corpus.module 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. # @Author: Bachir Soussi Chiadmi <bach>
  3. # @Date: 13-12-2017
  4. # @Email: bachir@figureslibres.io
  5. # @Filename: edlp_corpus.routing.yml
  6. # @Last modified by: bach
  7. # @Last modified time: 20-12-2017
  8. # @License: GPL-V3
  9. /**
  10. * Implements hook_theme().
  11. */
  12. function edlp_corpus_theme($existing, $type, $theme, $path) {
  13. // @see https://www.drupal.org/docs/8/theming/twig/create-custom-twig-templates-from-custom-module
  14. return array(
  15. 'blockentrees' => array(
  16. // 'render element' => '',
  17. 'file' => 'blockentrees.inc',
  18. 'variables' => array(
  19. 'entrees_items' => array(),
  20. ),
  21. ),
  22. );
  23. }
  24. /**
  25. * Implements hook_page_attachments().
  26. * @param array $attachments
  27. */
  28. // function edlp_corpus_page_attachments(array &$attachments) {
  29. // //add here any conditions if you need to limit the pages
  30. // if (\Drupal::service('path.matcher')->isFrontPage()) {
  31. // // $attachments['#attached']['library'][] = 'edlp_corpus/corpus';
  32. // // $attachments['#attached']['drupalSettings']['basepath'] = base_path();
  33. // // $attachments['#attached']['drupalSettings']['pathtoedlpcorpus'] = base_path() . drupal_get_path('module', 'edlp_corpus');
  34. // // $attachments['#attached']['drupalSettings']['pathtotfiles'] = PublicStream::basePath();
  35. // }
  36. // }