Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

AttachmentsResponseProcessorInterface.php

Namespace

Drupal\Core\Render

File

core/lib/Drupal/Core/Render/AttachmentsResponseProcessorInterface.php

View source
<?php

namespace Drupal\Core\Render;


/**
 * Defines an interface for processing attachments of responses that have them.
 *
 * @see \Drupal\Core\Ajax\AjaxResponse
 * @see \Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor
 * @see \Drupal\Core\Render\AttachmentsInterface
 * @see \Drupal\Core\Render\HtmlResponse
 * @see \Drupal\Core\Render\HtmlResponseAttachmentsProcessor
 */
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);

}

Interfaces

Title Deprecated Summary
AttachmentsResponseProcessorInterface Defines an interface for processing attachments of responses that have them.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal