Skip to content
PHP Ecosystem
Explore

HasMicroData

API reference › HTML Attribute › Global › HasMicroData

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

Provides an immutable API for microdata attributes.

MethodDescriptionDefined by
itemId()Sets the itemid attribute.HasMicroData
itemProp()Sets the itemprop attribute.HasMicroData
itemRef()Sets the itemref attribute.HasMicroData
itemScope()Sets the itemscope attribute.HasMicroData
itemType()Sets the itemtype attribute.HasMicroData
public function itemId(string|Stringable|UnitEnum|null $value): static

Sets the itemid attribute.

Parameters

ParameterTypeDescription
$valuestring|Stringable|UnitEnum|nullMicrodata item ID, or null to remove the attribute.

Returns

static: New instance with the updated itemid attribute.

See also

public function itemProp(string|Stringable|UnitEnum|null $value): static

Sets the itemprop attribute.

Parameters

ParameterTypeDescription
$valuestring|Stringable|UnitEnum|nullMicrodata item property, or null to remove the attribute.

Returns

static: New instance with the updated itemprop attribute.

See also

public function itemRef(string|Stringable|UnitEnum|null $value): static

Sets the itemref attribute.

Parameters

ParameterTypeDescription
$valuestring|Stringable|UnitEnum|nullMicrodata item reference, or null to remove the attribute.

Returns

static: New instance with the updated itemref attribute.

See also

public function itemScope(bool|null $value): static

Sets the itemscope attribute.

Parameters

ParameterTypeDescription
$valuebool|nullWhether to enable itemscope, or null to remove the attribute.

Returns

static: New instance with the updated itemscope attribute.

See also

public function itemType(string|Stringable|UnitEnum|null $value): static

Sets the itemtype attribute.

Parameters

ParameterTypeDescription
$valuestring|Stringable|UnitEnum|nullMicrodata item type, or null to remove the attribute.

Returns

static: New instance with the updated itemtype attribute.

See also