You are here

cdn.services.yml in CDN 8.3

File

cdn.services.yml
View source
  1. services:
  2. cdn.settings:
  3. class: Drupal\cdn\CdnSettings
  4. arguments: ['@config.factory']
  5. cdn.file_url_generator:
  6. class: Drupal\cdn\File\FileUrlGenerator
  7. arguments: ['%app.root%', '@stream_wrapper_manager', '@request_stack', '@private_key', '@cdn.settings']
  8. # Event subscribers.
  9. cdn.config_subscriber:
  10. class: Drupal\cdn\EventSubscriber\ConfigSubscriber
  11. arguments: ['@cache_tags.invalidator', '@config.typed', '@kernel', '@config.installer']
  12. tags:
  13. - { name: event_subscriber }
  14. cdn.html_response_subscriber:
  15. class: Drupal\cdn\EventSubscriber\HtmlResponseSubscriber
  16. arguments: ['@cdn.settings']
  17. tags:
  18. - { name: event_subscriber }
  19. # Controllers.
  20. cdn.controller.farfuture:
  21. class: \Drupal\cdn\CdnFarfutureController
  22. arguments: ['@private_key', '@stream_wrapper_manager']
  23. # Inbound path processor for the cdn.farfuture.download route, since the
  24. # Drupal 8/Symfony routing system does not support "menu tail" or "slash in
  25. # route parameter". See:
  26. # - http://symfony.com/doc/2.8/routing/slash_in_parameter.html
  27. # - http://drupal.stackexchange.com/questions/175758/slashes-in-single-route-parameter-or-other-ways-to-handle-a-menu-tail-with-dynam
  28. # - https://api.drupal.org/api/drupal/includes%21menu.inc/function/menu_tail_to_arg/7.x
  29. path_processor.cdn:
  30. class: Drupal\cdn\PathProcessor\CdnFarfuturePathProcessor
  31. tags:
  32. - { name: path_processor_inbound }
  33. # Decorators.
  34. cdn.asset.css.optimizer:
  35. public: false
  36. class: Drupal\cdn\Asset\CssOptimizer
  37. decorates: asset.css.optimizer
  38. arguments: ['@cdn.asset.css.optimizer.inner']