protected function processText($text,
$langcode = LanguageInterface::LANGCODE_NOT_SPECIFIED, array
$filter_ids =
['media_embed'
]) { $manager =
$this->container->
get('plugin.manager.filter'
);
$bag =
new FilterPluginCollection($manager,
[]);
$filters =
[];
foreach ($filter_ids as $filter_id) { $filters[] =
$bag->
get($filter_id);
} $render_context =
new RenderContext();
/** @var \Drupal\filter\FilterProcessResult $filter_result */
$filter_result =
$this->container->
get('renderer'
)->
executeInRenderContext($render_context,
function D
) use ($text,
$filters,
$langcode) { $metadata =
new BubbleableMetadata();
foreach ($filters as $filter) { /** @var \Drupal\filter\FilterProcessResult $result */