Attribute::jsonSerialize

public Attribute::jsonSerialize()

Returns a representation of the object for use in JSON serialization.

Return value

string The safe string content.

File

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

Class

Attribute
Collects, sanitizes, and renders HTML attributes.

Namespace

Drupal\Core\Template

Code

1
2
3
public function jsonSerialize() {
  return (string) $this;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.