public static function TwigConvert::booleanValue in Twig Tools 8
Returns the boolean value of a passed variable.
Parameters
mixed $value: The variable to get the boolean equivalent value of.
Return value
bool The boolean value equivalent of the variable.
File
- src/
TwigExtension/ TwigConvert.php, line 41
Class
- TwigConvert
- Class TwigConvert.
Namespace
Drupal\twig_tools\TwigExtensionCode
public static function booleanValue($value) {
return boolval($value);
}