->
merge($enabled_plugin_elements) // Compute the overlap.
->
intersect($source_enabled_element) // Exclude the enabled plugin tags from the overlap; we merged these
// previously to be able to resolve wildcards.
->
diff($enabled_plugin_overlap);
foreach ([$enabled_plugin_overlap,
$disabled_plugin_overlap] as $overlap) { $checking_enabled =
$overlap ===
$enabled_plugin_overlap;
if (!
$overlap->
allowsNothing()) { $plugins_to_check_against =
$checking_enabled ?
$other_enabled_plugins :
$enableable_disabled_plugins;
$plain_tags_to_check_against =
$checking_enabled ?
$enabled_plugin_plain_tags :
$disabled_plugin_plain_tags;
$tags_plugin_report =
$this->
pluginsSupplyingTagsMessage($overlap,
$plugins_to_check_against,
$enabled_plugin_elements);
$message =
$checking_enabled ?
$constraint->enabledPluginsMessage :
$constraint->availablePluginsMessage;
// Determine which element type is relevant for the violation message.
assert(count($overlap->
getAllowedElements(FALSE
)) === 1
);
$overlap_tag =
array_keys($overlap->
getAllowedElements(FALSE
))[0
];
$is_attr_overlap = self::
tagHasAttributeRestrictions($overlap,
$overlap_tag);
// If the entirety (so not just the tag but also the attributes, and not
// just some of the attribute values, but all of them) of the HTML
// elements being configured to be edited via the Source Editing plugin
// is supported by a CKEditor 5 plugin, complain. But if some attribute