function HTMLRestrictions::getWildcardTags

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

Computes the tags that match the provided wildcard.

A wildcard tag in element config is a way of representing multiple tags with a single item, such as `<$text-container>` to represent CKEditor 5's `$block` text container tags. Each wildcard should have a corresponding callback method listed in WILDCARD_ELEMENT_METHODS that returns the set of tags represented by the wildcard.

Parameters

string $wildcard: The wildcard that represents multiple tags.

Return value

string[] An array of HTML tags.

1 call to HTMLRestrictions::getWildcardTags()
HTMLRestrictions::resolveWildcards in core/modules/ckeditor5/src/HTMLRestrictions.php
Resolves the wildcard tags (this consumes the wildcard tags).

File

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

Class

HTMLRestrictions
Represents a set of HTML restrictions.

Namespace

Drupal\ckeditor5

Code

private static function getWildcardTags(string $wildcard) : array {
    $wildcard_element_method = self::WILDCARD_ELEMENT_METHODS[$wildcard];
    return call_user_func([
        self::class,
        $wildcard_element_method,
    ]);
}

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