function Htmx::hasAttribute

Checks if an attribute is set.

Parameters

string $name: The name of the attribute.

Return value

bool True if attribute is stored.

File

core/lib/Drupal/Core/Htmx/Htmx.php, line 254

Class

Htmx
Presents the HTMX controls for developers to use with render arrays.

Namespace

Drupal\Core\Htmx

Code

public function hasAttribute(string $name) : bool {
  return $this->attributes
    ->hasAttribute($name);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.