You are here

public function Twig_Extension_Core::getFunctions in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/lib/Twig/Extension/Core.php \Twig_Extension_Core::getFunctions()

File

vendor/twig/twig/lib/Twig/Extension/Core.php, line 195

Class

Twig_Extension_Core

Code

public function getFunctions() {
  return array(
    new Twig_SimpleFunction('max', 'max'),
    new Twig_SimpleFunction('min', 'min'),
    new Twig_SimpleFunction('range', 'range'),
    new Twig_SimpleFunction('constant', 'twig_constant'),
    new Twig_SimpleFunction('cycle', 'twig_cycle'),
    new Twig_SimpleFunction('random', 'twig_random', array(
      'needs_environment' => true,
    )),
    new Twig_SimpleFunction('date', 'twig_date_converter', array(
      'needs_environment' => true,
    )),
    new Twig_SimpleFunction('include', 'twig_include', array(
      'needs_environment' => true,
      'needs_context' => true,
      'is_safe' => array(
        'all',
      ),
    )),
    new Twig_SimpleFunction('source', 'twig_source', array(
      'needs_environment' => true,
      'is_safe' => array(
        'all',
      ),
    )),
  );
}