core/core.services.yml | 1 + core/lib/Drupal/Core/Render/PlaceholderGeneratorInterface.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/core.services.yml b/core/core.services.yml index 2ca91ad..f499cce 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -1487,6 +1487,7 @@ services: render_placeholder_generator: class: Drupal\Core\Render\PlaceholderGenerator arguments: ['%renderer.config%'] + public: false render_cache: class: Drupal\Core\Render\PlaceholderingRenderCache arguments: ['@request_stack', '@cache_factory', '@cache_contexts_manager', '@render_placeholder_generator'] diff --git a/core/lib/Drupal/Core/Render/PlaceholderGeneratorInterface.php b/core/lib/Drupal/Core/Render/PlaceholderGeneratorInterface.php index df9034d..89802a2 100644 --- a/core/lib/Drupal/Core/Render/PlaceholderGeneratorInterface.php +++ b/core/lib/Drupal/Core/Render/PlaceholderGeneratorInterface.php @@ -8,7 +8,14 @@ namespace Drupal\Core\Render; /** - * Defines an interface for caching rendered render arrays. + * Defines an interface for turning a render array into a placeholder. + * + * This encapsulates logic related to generating placeholders. + * + * Makes it possible to determine whether a render array can be placeholdered + * (it can be reconstructed independently of the request context), whether a + * render array should be placeholdered (its cacheability meets the conditions), + * and to create a placeholder. * * @see \Drupal\Core\Render\RendererInterface */