public function Twig_Extension_Core::getFunctions

Returns a list of global functions to add to the existing list.

Return value

array An array of global functions

File

drupal/core/vendor/twig/twig/lib/Twig/Extension/Core.php, line 179

Class

Twig_Extension_Core

Code

public function getFunctions() {
  return array(
    'range' => new Twig_Function_Function('range'),
    'constant' => new Twig_Function_Function('constant'),
    'cycle' => new Twig_Function_Function('twig_cycle'),
    'random' => new Twig_Function_Function('twig_random', array(
      'needs_environment' => true,
    )),
    'date' => new Twig_Function_Function('twig_date_converter', array(
      'needs_environment' => true,
    )),
  );
}