function HTMLRestrictions::isWildcardAttributeName

Same name and namespace in other branches
  1. 9 core/modules/ckeditor5/src/HTMLRestrictions.php \Drupal\ckeditor5\HTMLRestrictions::isWildcardAttributeName()
  2. 10 core/modules/ckeditor5/src/HTMLRestrictions.php \Drupal\ckeditor5\HTMLRestrictions::isWildcardAttributeName()

Checks whether the given attribute name contains a wildcard, e.g. `data-*`.

Parameters

string $attribute_name: The attribute name to check.

Return value

bool Whether the given attribute name contains a wildcard.

1 call to HTMLRestrictions::isWildcardAttributeName()
HTMLRestrictions::getRegExForWildCardAttributeName in core/modules/ckeditor5/src/HTMLRestrictions.php
Computes a regular expression for matching a wildcard attribute name.

File

core/modules/ckeditor5/src/HTMLRestrictions.php, line 1040

Class

HTMLRestrictions
Represents a set of HTML restrictions.

Namespace

Drupal\ckeditor5

Code

private static function isWildcardAttributeName(string $attribute_name) : bool {
    // @see ::validateAllowedRestrictionsPhase3()
    assert($attribute_name !== '*');
    return str_contains($attribute_name, '*');
}

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