You are here

public function Twig_SimpleFunction::getSafe in Translation template extractor 7.3

Same name and namespace in other branches
  1. 6.3 vendor/Twig/SimpleFunction.php \Twig_SimpleFunction::getSafe()

File

vendor/Twig/SimpleFunction.php, line 75

Class

Twig_SimpleFunction
Represents a template function.

Code

public function getSafe(Twig_Node $functionArgs) {
  if (null !== $this->options['is_safe']) {
    return $this->options['is_safe'];
  }
  if (null !== $this->options['is_safe_callback']) {
    return call_user_func($this->options['is_safe_callback'], $functionArgs);
  }
  return array();
}