Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Core / Render / AttachmentsInterface.php
1 <?php
2
3 namespace Drupal\Core\Render;
4
5 /**
6  * Defines an interface for responses that can expose #attached metadata.
7  *
8  * @todo If in Drupal 9, we remove attachments other than assets (libraries +
9  *   drupalSettings), then we can look into unifying this with
10  *   \Drupal\Core\Asset\AttachedAssetsInterface.
11  *
12  * @see \Drupal\Core\Render\AttachmentsTrait
13  */
14 interface AttachmentsInterface {
15
16   /**
17    * Gets attachments.
18    *
19    * @return array
20    *   The attachments.
21    */
22   public function getAttachments();
23
24   /**
25    * Adds attachments.
26    *
27    * @param array $attachments
28    *   The attachments to add.
29    *
30    * @return $this
31    */
32   public function addAttachments(array $attachments);
33
34   /**
35    * Sets attachments.
36    *
37    * @param array $attachments
38    *   The attachments to set.
39    *
40    * @return $this
41    */
42   public function setAttachments(array $attachments);
43
44 }