function HTMLRestrictions::isWildcardTag

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

Checks whether given tag is a wildcard.

Parameters

string $tag_name: A tag name.

Return value

bool TRUE if it is a wildcard, otherwise FALSE.

4 calls to HTMLRestrictions::isWildcardTag()
HTMLRestrictions::applyOperation in core/modules/ckeditor5/src/HTMLRestrictions.php
Applies an operation (difference/intersection/union) with wildcard support.
HTMLRestrictions::getConcreteSubset in core/modules/ckeditor5/src/HTMLRestrictions.php
Gets the subset of allowed elements whose tags are concrete.
HTMLRestrictions::resolveWildcards in core/modules/ckeditor5/src/HTMLRestrictions.php
Resolves the wildcard tags (this consumes the wildcard tags).
HTMLRestrictions::validateAllowedRestrictionsPhase1 in core/modules/ckeditor5/src/HTMLRestrictions.php
Validates allowed elements — phase 1: shape of keys.

File

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

Class

HTMLRestrictions
Represents a set of HTML restrictions.

Namespace

Drupal\ckeditor5

Code

private static function isWildcardTag(string $tag_name) : bool {
    return str_starts_with($tag_name, '$') && array_key_exists($tag_name, self::WILDCARD_ELEMENT_METHODS);
}

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