function HTMLRestrictions::getConcreteSubset

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

Gets the subset of allowed elements whose tags are concrete.

Return value

\Drupal\ckeditor5\HTMLRestrictions The subset of the given set of HTML restrictions.

File

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

Class

HTMLRestrictions
Represents a set of HTML restrictions.

Namespace

Drupal\ckeditor5

Code

public function getConcreteSubset() : HTMLRestrictions {
    return new self(array_filter($this->elements, function (string $tag_name) {
        return !self::isWildcardTag($tag_name);
    }, ARRAY_FILTER_USE_KEY));
}

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