Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Attribute.php

function Attribute::offsetSet

4 calls to Attribute::offsetSet()
Attribute::addClass in core/lib/Drupal/Core/Template/Attribute.php
Adds classes or merges them on to array of existing CSS classes.
Attribute::offsetGet in core/lib/Drupal/Core/Template/Attribute.php
Attribute::setAttribute in core/lib/Drupal/Core/Template/Attribute.php
Sets values for an attribute key.
Attribute::__construct in core/lib/Drupal/Core/Template/Attribute.php
Constructs a \Drupal\Core\Template\Attribute object.

File

core/lib/Drupal/Core/Template/Attribute.php, line 110

Class

Attribute
Collects, sanitizes, and renders HTML attributes.

Namespace

Drupal\Core\Template

Code

public function offsetSet($name, $value) : void {
    $this->storage[$name] = $this->createAttributeValue($name, $value);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal