Skip to content
PHP Ecosystem
Explore

HasContent

API reference › HTML Attribute › HasContent

traitUIAwesome\Html\Attribute\HasContent
Sourcesrc/HasContent.php
Used by 1 type

Provides an immutable API for the content attribute.

See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/content.

MethodDescriptionDefined by
content()Sets the content attribute.HasContent
public function content(string|Stringable|UnitEnum|null $value): static

Sets the content attribute.

Defines the metadata value for the current name or http-equiv entry.

Parameters

ParameterTypeDescription
$valuestring|Stringable|UnitEnum|nullMetadata content value, or null to remove the attribute.

Returns

static: New instance with the updated content attribute.