Esempio n. 1
0
 /**
  * Get declared functions.
  *
  * @return \Twig_SimpleFunction[]
  */
 public function getFunctions()
 {
     return [new \Twig_SimpleFunction('elementExists', function ($name) {
         return $this->view->elementExists($name);
     }), new \Twig_SimpleFunction('getVars', function () {
         return $this->view->getVars();
     }), new \Twig_SimpleFunction('get', function ($var, $default = null) {
         return $this->view->get($var, $default);
     })];
 }