public function Attribute::__clone

Implements the magic __clone() method.

File

drupal/core/lib/Drupal/Core/Template/Attribute.php, line 118
Definition of Drupal\Core\Template\Attribute.

Class

Attribute
A class that can be used for collecting then rendering HTML attributtes.

Namespace

Drupal\Core\Template

Code

public function __clone() {
  foreach ($this->storage as $name => $value) {
    if (is_object($value)) {
      $this->storage[$name] = clone $value;
    }
  }
}