function HTMLRestrictions::fromFilterPluginInstance

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

Constructs a set of HTML restrictions matching the given text format.

Parameters

\Drupal\filter\Plugin\FilterInterface $filter: A filter plugin instance to construct a HTML restrictions object for.

Return value

\Drupal\ckeditor5\HTMLRestrictions

2 calls to HTMLRestrictions::fromFilterPluginInstance()
FundamentalCompatibilityConstraintValidator::checkHtmlRestrictionsMatch in core/modules/ckeditor5/src/Plugin/Validation/Constraint/FundamentalCompatibilityConstraintValidator.php
Checks the HTML restrictions match the enabled CKEditor 5 plugins' output.
GlobalAttribute::getDynamicPluginConfig in core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/GlobalAttribute.php
Allows a plugin to modify its static configuration.

File

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

Class

HTMLRestrictions
Represents a set of HTML restrictions.

Namespace

Drupal\ckeditor5

Code

public static function fromFilterPluginInstance(FilterInterface $filter) : HTMLRestrictions {
    return self::fromObjectWithHtmlRestrictions($filter);
}

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