->
setParameter('@non_creatable_tag',
$non_creatable_tag) ->
setParameter('%plugin',
$plugin_definition->
label()) ->
setParameter('@attributes_on_tag',
implode(', ',
$attributes_on_tag->
toCKEditor5ElementsArray()));
// If this plugin has a configurable subset, associate the violation
// with the property path pointing to this plugin's settings form.
if (is_a($plugin_definition->
getClass(), CKEditor5PluginElementsSubsetInterface::
class, TRUE
)) { $violation->
atPath(sprintf('settings.plugins.%s',
$plugin_definition->
id()));
} // If this plugin is associated with a toolbar item, associate the
// violation with the property path pointing to the active toolbar item.
elseif ($plugin_definition->
hasToolbarItems()) { $toolbar_items =
$plugin_definition->
getToolbarItems();
$active_toolbar_items =
array_intersect( $text_editor->
getSettings()['toolbar'
]['items'
],
array_keys($toolbar_items) );
$violation->
atPath(sprintf('settings.toolbar.items.%d',
array_keys($active_toolbar_items)[0
]));
} $violation->
addViolation();
} } }