public function PreparedTagElement::setAttribute in Extensible BBCode 4.0.x
Same name and namespace in other branches
- 8.3 src/PreparedTagElement.php \Drupal\xbbcode\PreparedTagElement::setAttribute()
Set an attribute of the element.
Parameters
string $name: The name of the attribute.
string|null $value: (Optional) The value of the attribute, or NULL to unset it.
Overrides TagElementInterface::setAttribute
File
- src/
PreparedTagElement.php, line 94
Class
- PreparedTagElement
- Adapter for the tag element that marks markup as safe.
Namespace
Drupal\xbbcodeCode
public function setAttribute(string $name, string $value = NULL) : void {
$this->tag
->setAttribute($name, $value);
}