View source
- services:
- cdn.settings:
- class: Drupal\cdn\CdnSettings
- arguments: ['@config.factory']
-
- cdn.file_url_generator:
- class: Drupal\cdn\File\FileUrlGenerator
- arguments: ['%app.root%', '@stream_wrapper_manager', '@request_stack', '@private_key', '@cdn.settings']
-
- # Event subscribers.
- cdn.config_subscriber:
- class: Drupal\cdn\EventSubscriber\ConfigSubscriber
- arguments: ['@cache_tags.invalidator', '@config.typed', '@kernel', '@config.installer']
- tags:
- - { name: event_subscriber }
- cdn.html_response_subscriber:
- class: Drupal\cdn\EventSubscriber\HtmlResponseSubscriber
- arguments: ['@cdn.settings']
- tags:
- - { name: event_subscriber }
-
- # Controllers.
- cdn.controller.farfuture:
- class: \Drupal\cdn\CdnFarfutureController
- arguments: ['@private_key', '@stream_wrapper_manager']
-
- # Inbound path processor for the cdn.farfuture.download route, since the
- # Drupal 8/Symfony routing system does not support "menu tail" or "slash in
- # route parameter". See:
- # - http://symfony.com/doc/2.8/routing/slash_in_parameter.html
- # - http://drupal.stackexchange.com/questions/175758/slashes-in-single-route-parameter-or-other-ways-to-handle-a-menu-tail-with-dynam
- # - https://api.drupal.org/api/drupal/includes%21menu.inc/function/menu_tail_to_arg/7.x
- path_processor.cdn:
- class: Drupal\cdn\PathProcessor\CdnFarfuturePathProcessor
- tags:
- - { name: path_processor_inbound }
-
- # Decorators.
- cdn.asset.css.optimizer:
- public: false
- class: Drupal\cdn\Asset\CssOptimizer
- decorates: asset.css.optimizer
- arguments: ['@cdn.asset.css.optimizer.inner']