This repository has been archived on 2025-01-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/vendor/chi-teck/drupal-code-generator/templates/d8/service/cache-context.services.twig
2018-11-23 12:29:20 +00:00

10 lines
331 B
Twig

services:
cache_context.{{ context_id }}:
class: Drupal\{{ machine_name }}\Cache\Context\{{ class }}
{% if base_class == 'RequestStackCacheContextBase' %}
arguments: ['@request_stack']
{% elseif base_class == 'UserCacheContextBase' %}
arguments: ['@current_user']
{% endif %}
tags:
- { name: cache.context}