createPlaceholder('\Drupal\filter_test\Plugin\Filter\FilterTestPlaceholders::renderDynamicThing', ['llama']); $result->setProcessedText($text . '

' . $placeholder . '

'); return $result; } /** * #lazy_builder callback; builds a render array containing the dynamic thing. * * @param string $thing * A "thing" string. * * @return array * A renderable array. */ public static function renderDynamicThing($thing) { return [ '#markup' => format_string('This is a dynamic @thing.', ['@thing' => $thing]), ]; } }