Attribute

Collects, sanitizes, and renders HTML attributes. To use, optionally pass in an associative array of defined attributes, or add attributes using array syntax. For example: $attributes = new Attribute(array('id' => 'socks')); $attributes['class'] = array('black-cat', 'white-cat'); $attributes['class'][] = 'black-white-cat'; echo '<cat' . $attributes . '>'; // Produces <cat id="socks" class="black-cat white-cat black-white-cat"> $attributes always prints out all the attribut

Attribute::$storage

Stores the attribute data. Type: \Drupal\Core\Template\AttributeValueBase[] File core/lib/Drupal/Core/Template/Attribute.php, line 72 Class Attribute Collects, sanitizes, and renders HTML attributes. Namespace Drupal\Core\Template Code protected $storage = array();

AttachmentsTrait::$attachments

The attachments for this response. Type: array File core/lib/Drupal/Core/Render/AttachmentsTrait.php, line 17 Class AttachmentsTrait Provides an implementation of AttachmentsInterface. Namespace Drupal\Core\Render Code protected $attachments = [];

AttachmentsTrait

Provides an implementation of AttachmentsInterface. Hierarchy trait \Drupal\Core\Render\AttachmentsTrait See also \Drupal\Core\Render\AttachmentsInterface File core/lib/Drupal/Core/Render/AttachmentsTrait.php, line 10 Namespace Drupal\Core\Render Members Name Modifiers Type Description AttachmentsTrait::$attachments protected property The attachments for this response. AttachmentsTrait::addAttachments public function Adds attachments. Overrides AttachmentsInterf

AttachmentsTrait::setAttachments

public AttachmentsTrait::setAttachments(array $attachments) Sets attachments. Parameters array $attachments: The attachments to set. Return value $this Overrides AttachmentsInterface::setAttachments File core/lib/Drupal/Core/Render/AttachmentsTrait.php, line 37 Class AttachmentsTrait Provides an implementation of AttachmentsInterface. Namespace Drupal\Core\Render Code public function setAttachments(array $attachments) { $this->attachments = $attachments; return $this; }

AttachmentsTrait::addAttachments

public AttachmentsTrait::addAttachments(array $attachments) Adds attachments. Parameters array $attachments: The attachments to add. Return value $this Overrides AttachmentsInterface::addAttachments File core/lib/Drupal/Core/Render/AttachmentsTrait.php, line 29 Class AttachmentsTrait Provides an implementation of AttachmentsInterface. Namespace Drupal\Core\Render Code public function addAttachments(array $attachments) { $this->attachments = BubbleableMetadata::mergeAttachments($

AttachmentsTrait::getAttachments

public AttachmentsTrait::getAttachments() Gets attachments. Return value array The attachments. Overrides AttachmentsInterface::getAttachments File core/lib/Drupal/Core/Render/AttachmentsTrait.php, line 22 Class AttachmentsTrait Provides an implementation of AttachmentsInterface. Namespace Drupal\Core\Render Code public function getAttachments() { return $this->attachments; }

AttachmentsInterface::addAttachments

public AttachmentsInterface::addAttachments(array $attachments) Adds attachments. Parameters array $attachments: The attachments to add. Return value $this File core/lib/Drupal/Core/Render/AttachmentsInterface.php, line 32 Class AttachmentsInterface Defines an interface for responses that can expose #attached metadata. Namespace Drupal\Core\Render Code public function addAttachments(array $attachments);

AttachmentsResponseProcessorInterface

Defines an interface for processing attachments of responses that have them. Hierarchy interface \Drupal\Core\Render\AttachmentsResponseProcessorInterface See also \Drupal\Core\Ajax\AjaxResponse \Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor \Drupal\Core\Render\HtmlResponse \Drupal\Core\Render\HtmlResponseAttachmentsProcessor File core/lib/Drupal/Core/Render/AttachmentsResponseProcessorInterface.php, line 13 Namespace Drupal\Core\Render Members Name Modifiers Type Descripti

AttachmentsInterface::setAttachments

public AttachmentsInterface::setAttachments(array $attachments) Sets attachments. Parameters array $attachments: The attachments to set. Return value $this File core/lib/Drupal/Core/Render/AttachmentsInterface.php, line 42 Class AttachmentsInterface Defines an interface for responses that can expose #attached metadata. Namespace Drupal\Core\Render Code public function setAttachments(array $attachments);