public static function FilterTestPlaceholders::renderDynamicThing in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestPlaceholders.php \Drupal\filter_test\Plugin\Filter\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 44 - Contains \Drupal\filter_test\Plugin\Filter\FilterTestPlaceholders.
Class
- FilterTestPlaceholders
- Provides a test filter to use placeholders.
Namespace
Drupal\filter_test\Plugin\FilterCode
public static function renderDynamicThing($thing) {
return [
'#markup' => format_string('This is a dynamic @thing.', array(
'@thing' => $thing,
)),
];
}