public static function TwigTweakExtension::drupalBreakpoint in Twig Tweak 3.x
Same name and namespace in other branches
- 3.1.x src/TwigTweakExtension.php \Drupal\twig_tweak\TwigTweakExtension::drupalBreakpoint()
Emits a breakpoint to the debug client.
Parameters
\Twig\Environment $environment: The Twig environment instance.
array $context: Variables from the current Twig template.
File
- src/
TwigTweakExtension.php, line 423
Class
- TwigTweakExtension
- Twig extension with some useful functions and filters.
Namespace
Drupal\twig_tweakCode
public static function drupalBreakpoint(Environment $environment, array $context) : void {
if (function_exists('xdebug_break')) {
xdebug_break();
}
else {
trigger_error('Could not make a break because xdebug is not available.', E_USER_WARNING);
}
}