$this->pluginManager->
getProvidedElements($enabled_plugins, NULL, FALSE, TRUE
) );
// Determine the still needed plain tags, the still needed attributes, and
// the union of both.
$still_needed_plain_tags =
$needed->
extractPlainTagsSubset()->
diff($provided_plain_tags);
$still_needed_attributes =
$needed->
diff($provided)->
diff($still_needed_plain_tags);
$still_needed =
$still_needed_plain_tags->
merge($still_needed_attributes);
if (!
$still_needed->
allowsNothing()) { // Select plugins for supporting the still needed plain tags.
$plugin_candidates_plain_tags = self::
getCandidates($provided_plain_tags,
$still_needed_plain_tags,
$disabled_definitions);
$selected_plugins_plain_tags = self::
selectCandidate($plugin_candidates_plain_tags,
$still_needed_plain_tags,
array_keys($provided_plain_tags->
getAllowedElements()));
// Select plugins for supporting the still needed attributes.
$plugin_candidates_attributes = self::
getCandidates($provided,
$still_needed_attributes,
$disabled_definitions);
$selected_plugins_attributes = self::
selectCandidate($plugin_candidates_attributes,
$still_needed,
array_keys($provided->
getAllowedElements()));
// Combine the selection.
$selected_plugins =
array_merge_recursive($selected_plugins_plain_tags,
$selected_plugins_attributes);
// If additional plugins need to be enabled to support attribute config,
// loop through the list to enable the plugins and build a UI message that