interface AttachmentsInterface in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Render/AttachmentsInterface.php \Drupal\Core\Render\AttachmentsInterface
Defines an interface for responses that can expose #attached metadata.
@todo If in Drupal 9, we remove attachments other than assets (libraries + drupalSettings), then we can look into unifying this with \Drupal\Core\Asset\AttachedAssetsInterface.
Hierarchy
- interface \Drupal\Core\Render\AttachmentsInterface
Expanded class hierarchy of AttachmentsInterface
All classes that implement AttachmentsInterface
See also
\Drupal\Core\Render\AttachmentsTrait
6 files declare their use of AttachmentsInterface
- AjaxResponse.php in core/
lib/ Drupal/ Core/ Ajax/ AjaxResponse.php - Contains \Drupal\Core\Ajax\AjaxResponse.
- AjaxResponseAttachmentsProcessor.php in core/
lib/ Drupal/ Core/ Ajax/ AjaxResponseAttachmentsProcessor.php - Contains \Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor.
- AttachmentsTestDomainObject.php in core/
modules/ system/ tests/ modules/ early_rendering_controller_test/ src/ AttachmentsTestDomainObject.php - Contains \Drupal\early_rendering_controller_test\AttachmentsTestDomainObject.
- AttachmentsTestResponse.php in core/
modules/ system/ tests/ modules/ early_rendering_controller_test/ src/ AttachmentsTestResponse.php - Contains \Drupal\early_rendering_controller_test\AttachmentsTestResponse.
- EarlyRenderingControllerWrapperSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ EarlyRenderingControllerWrapperSubscriber.php - Contains \Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.
File
- core/
lib/ Drupal/ Core/ Render/ AttachmentsInterface.php, line 19 - Contains \Drupal\Core\Render\AttachmentsInterface.
Namespace
Drupal\Core\RenderView source
interface AttachmentsInterface {
/**
* Gets attachments.
*
* @return array
* The attachments.
*/
public function getAttachments();
/**
* Adds attachments.
*
* @param array $attachments
* The attachments to add.
*
* @return $this
*/
public function addAttachments(array $attachments);
/**
* Sets attachments.
*
* @param array $attachments
* The attachments to set.
*
* @return $this
*/
public function setAttachments(array $attachments);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AttachmentsInterface:: |
public | function | Adds attachments. | |
AttachmentsInterface:: |
public | function | Gets attachments. | |
AttachmentsInterface:: |
public | function | Sets attachments. |