interface AttachmentsResponseProcessorInterface

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Render/AttachmentsResponseProcessorInterface.php \Drupal\Core\Render\AttachmentsResponseProcessorInterface
  2. 8.9.x core/lib/Drupal/Core/Render/AttachmentsResponseProcessorInterface.php \Drupal\Core\Render\AttachmentsResponseProcessorInterface
  3. 11.x core/lib/Drupal/Core/Render/AttachmentsResponseProcessorInterface.php \Drupal\Core\Render\AttachmentsResponseProcessorInterface

Defines an interface for processing attachments of responses that have them.

Hierarchy

Expanded class hierarchy of AttachmentsResponseProcessorInterface

All classes that implement AttachmentsResponseProcessorInterface

See also

\Drupal\Core\Ajax\AjaxResponse

\Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor

\Drupal\Core\Render\AttachmentsInterface

\Drupal\Core\Render\HtmlResponse

\Drupal\Core\Render\HtmlResponseAttachmentsProcessor

4 files declare their use of AttachmentsResponseProcessorInterface
AjaxResponseAttachmentsProcessor.php in core/lib/Drupal/Core/Ajax/AjaxResponseAttachmentsProcessor.php
BigPipeResponseAttachmentsProcessor.php in core/modules/big_pipe/src/Render/BigPipeResponseAttachmentsProcessor.php
BigPipeResponseAttachmentsProcessorTest.php in core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
HtmlResponseSubscriber.php in core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php

File

core/lib/Drupal/Core/Render/AttachmentsResponseProcessorInterface.php, line 14

Namespace

Drupal\Core\Render
View source
interface AttachmentsResponseProcessorInterface {
  
  /**
   * Processes the attachments of a response that has attachments.
   *
   * Placeholders need to be rendered first in order to have all attachments
   * available for processing. For an example, see
   * \Drupal\Core\Render\HtmlResponseAttachmentsProcessor::renderPlaceholders()
   *
   * @param \Drupal\Core\Render\AttachmentsInterface $response
   *   The response to process.
   *
   * @return \Drupal\Core\Render\AttachmentsInterface
   *   The processed response, with the attachments updated to reflect their
   *   final values.
   *
   * @throws \InvalidArgumentException
   *   Thrown when the $response parameter is not the type of response object
   *   the processor expects.
   *
   * @see \Drupal\Core\Render\AttachmentsInterface
   */
  public function processAttachments(AttachmentsInterface $response);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
AttachmentsResponseProcessorInterface::processAttachments public function Processes the attachments of a response that has attachments. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.