Initial Drupal 11 with DDEV setup

This commit is contained in:
gluebox
2025-10-08 11:39:17 -04:00
commit 89ef74b305
25344 changed files with 2599172 additions and 0 deletions

View File

@ -0,0 +1,41 @@
{% import '@lib/di.twig' as di %}
<?php
declare(strict_types=1);
namespace Drupal\{{ machine_name }}\PageCache;
{% apply sort_namespaces %}
use Drupal\Core\PageCache\ResponsePolicyInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
{% if services %}
{{ di.use(services) }}
{% endif %}
{% endapply %}
/**
* @todo Add policy description here.
*/
final class {{ class }} implements ResponsePolicyInterface {
{% if services %}
/**
* Constructs {{ class|article }} object.
*/
public function __construct(
{{ di.signature(services) }}
) {}
{% endif %}
/**
* {@inheritdoc}
*/
public function check(Response $response, Request $request): ?string {
// @DCG
// Return self::DENY to indicate that the response should not be stored in
// the cache. Return NULL if the policy does not apply to the given request.
return NULL;
}
}

View File

@ -0,0 +1,11 @@
{% import '@lib/di.twig' as di %}
services:
{{ machine_name }}.page_cache_response_policy.{{ class|c2m }}:
class: Drupal\{{ machine_name }}\PageCache\{{ class }}
public: false
{% if services %}
arguments: [{{ di.arguments(services) }}]
{% endif %}
tags:
- { name: page_cache_response_policy }
- { name: dynamic_page_cache_response_policy }