function FilterTestPlaceholders::renderDynamicThing
#lazy_builder callback; builds a render array containing the dynamic thing.
Parameters
string $thing: A "thing" string.
Return value
array A renderable array.
File
-
core/
modules/ filter/ tests/ filter_test/ src/ Plugin/ Filter/ FilterTestPlaceholders.php, line 41
Class
- FilterTestPlaceholders
- Provides a test filter to use placeholders.
Namespace
Drupal\filter_test\Plugin\FilterCode
public static function renderDynamicThing($thing) {
return [
'#markup' => new FormattableMarkup('This is a dynamic @thing.', [
'@thing' => $thing,
]),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.