Mercurial > hg > isophonics-drupal-site
annotate core/lib/Drupal/Core/Render/AttachmentsInterface.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\Core\Render; |
Chris@0 | 4 |
Chris@0 | 5 /** |
Chris@0 | 6 * Defines an interface for responses that can expose #attached metadata. |
Chris@0 | 7 * |
Chris@0 | 8 * @todo If in Drupal 9, we remove attachments other than assets (libraries + |
Chris@0 | 9 * drupalSettings), then we can look into unifying this with |
Chris@0 | 10 * \Drupal\Core\Asset\AttachedAssetsInterface. |
Chris@0 | 11 * |
Chris@0 | 12 * @see \Drupal\Core\Render\AttachmentsTrait |
Chris@0 | 13 */ |
Chris@0 | 14 interface AttachmentsInterface { |
Chris@0 | 15 |
Chris@0 | 16 /** |
Chris@0 | 17 * Gets attachments. |
Chris@0 | 18 * |
Chris@0 | 19 * @return array |
Chris@0 | 20 * The attachments. |
Chris@0 | 21 */ |
Chris@0 | 22 public function getAttachments(); |
Chris@0 | 23 |
Chris@0 | 24 /** |
Chris@0 | 25 * Adds attachments. |
Chris@0 | 26 * |
Chris@0 | 27 * @param array $attachments |
Chris@0 | 28 * The attachments to add. |
Chris@0 | 29 * |
Chris@0 | 30 * @return $this |
Chris@0 | 31 */ |
Chris@0 | 32 public function addAttachments(array $attachments); |
Chris@0 | 33 |
Chris@0 | 34 /** |
Chris@0 | 35 * Sets attachments. |
Chris@0 | 36 * |
Chris@0 | 37 * @param array $attachments |
Chris@0 | 38 * The attachments to set. |
Chris@0 | 39 * |
Chris@0 | 40 * @return $this |
Chris@0 | 41 */ |
Chris@0 | 42 public function setAttachments(array $attachments); |
Chris@0 | 43 |
Chris@0 | 44 } |