Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Render/AttachmentsInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
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 } |