You are here

public function TagElementInterface::setAttribute in Extensible BBCode 4.0.x

Same name and namespace in other branches
  1. 8.3 src/Parser/Tree/TagElementInterface.php \Drupal\xbbcode\Parser\Tree\TagElementInterface::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.

2 methods override TagElementInterface::setAttribute()
PreparedTagElement::setAttribute in src/PreparedTagElement.php
Set an attribute of the element.
TagElement::setAttribute in src/Parser/Tree/TagElement.php
Set an attribute of the element.

File

src/Parser/Tree/TagElementInterface.php, line 77

Class

TagElementInterface
A tag occurrence as processed by tag plugins.

Namespace

Drupal\xbbcode\Parser\Tree

Code

public function setAttribute(string $name, string $value = NULL) : void;