//twig function ajout d'un token de securite au formulaire $GLOBALS['Twig']->addFunction(new Twig_SimpleFunction('securityForm', function () { $token = FoxFWKernel::getTokenPost(); $var = '<input type="hidden" name="tf_t" value="' . $token['token'] . '"/>'; $var .= '<input type="hidden" name="tf_u" value="' . $token['clef'] . '"/>'; return $var; }, array('is_safe' => array('html')))); //-------------------------------------------------------------------------------- //-------------------------------------------------------------------------------- // // // //-------------------------------------------------------------------------------- //twig extension function bundlePath ! $GLOBALS['Twig']->addFunction(new Twig_SimpleFunction('bundlePath', function ($path) { return FoxFWKernel::bundlePath($path); })); //-------------------------------------------------------------------------------- //-------------------------------------------------------------------------------- // // // //-------------------------------------------------------------------------------- //twig extension function path ! $GLOBALS['Twig']->addFunction(new Twig_SimpleFunction('path', function ($url) { return FoxFWKernel::path($url); })); //-------------------------------------------------------------------------------- //-------------------------------------------------------------------------------- // //