protected function Debug::getContextVariables in Devel 8.2
Same name and namespace in other branches
- 8.3 src/Twig/Extension/Debug.php \Drupal\devel\Twig\Extension\Debug::getContextVariables()
- 8 src/Twig/Extension/Debug.php \Drupal\devel\Twig\Extension\Debug::getContextVariables()
- 4.x src/Twig/Extension/Debug.php \Drupal\devel\Twig\Extension\Debug::getContextVariables()
Filters the Twig context variable.
Parameters
array $context: The Twig context.
Return value
array An array Twig context variables.
2 calls to Debug::getContextVariables()
- Debug::dump in src/
Twig/ Extension/ Debug.php - Provides debug function to Twig templates.
- Debug::message in src/
Twig/ Extension/ Debug.php - Provides debug function to Twig templates.
File
- src/
Twig/ Extension/ Debug.php, line 189
Class
- Debug
- Provides the Devel debugging function within Twig templates.
Namespace
Drupal\devel\Twig\ExtensionCode
protected function getContextVariables(array $context) {
$context_variables = [];
foreach ($context as $key => $value) {
if (!$value instanceof \Twig_Template) {
$context_variables[$key] = $value;
}
}
return $context_variables;
}