You are here

public function PreparedTagElement::getAttribute in Extensible BBCode 4.0.x

Same name and namespace in other branches
  1. 8.3 src/PreparedTagElement.php \Drupal\xbbcode\PreparedTagElement::getAttribute()

Retrieve a particular attribute of the element.

[tag NAME=VALUE]...[/tag]

Parameters

string $name: The name of the attribute, or NULL.

Return value

string|null The value of this attribute, or NULL if it isn't set.

Overrides TagElementInterface::getAttribute

File

src/PreparedTagElement.php, line 87

Class

PreparedTagElement
Adapter for the tag element that marks markup as safe.

Namespace

Drupal\xbbcode

Code

public function getAttribute(string $name) : ?string {
  return $this->tag
    ->getAttribute($name);
}