ClearableContentInterface
API reference › HTML Contracts › Element › ClearableContentInterface
Implemented by 1 type
Defines an optional immutable API for clearing accumulated element content.
Extends ContentInterface without requiring existing content implementations to support clearing.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
clearContent() abstract | Clears encoded and raw content without changing other component state. | ClearableContentInterface |
content() abstract | Appends encoded content. | ContentInterface |
getContent() abstract | Returns the content assigned to the element. | ContentInterface |
html() abstract | Appends trusted raw HTML content without encoding or sanitizing it. | ContentInterface |
Method details
Section titled “Method details”clearContent()
Section titled “clearContent() ”abstract public function clearContent(): staticClears encoded and raw content without changing other component state.
Returns
static: New instance with empty content.