function Htmx::hasAttribute

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Htmx/Htmx.php \Drupal\Core\Htmx\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 272

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.