function FibersTestExtension::fibersTestFunction
Custom Twig function that calls Fiber::suspend().
Parameters
string $message: The message to return.
Return value
string The processed message.
File
-
core/
modules/ system/ tests/ modules/ twig_fibers_test/ src/ TwigExtension/ FibersTestExtension.php, line 33
Class
- FibersTestExtension
- Custom Twig extension that suspends a fiber.
Namespace
Drupal\twig_fibers_test\TwigExtensionCode
public function fibersTestFunction(string $message) : string {
\Fiber::suspend();
return 'Fibers test: ' . $message;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.