From 06b3ca4b3bfe02dcfb49f5a3df1fd87ed11ffdaf Mon Sep 17 00:00:00 2001 From: Eliot Partridge Date: Sun, 2 Jul 2017 13:45:15 -0500 Subject: [PATCH] Forgot to make things Twig 2 compatible! --- app/Twig/Extensions/ReCaptchaExtension.php | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/app/Twig/Extensions/ReCaptchaExtension.php b/app/Twig/Extensions/ReCaptchaExtension.php index a953b22..7c9af0d 100644 --- a/app/Twig/Extensions/ReCaptchaExtension.php +++ b/app/Twig/Extensions/ReCaptchaExtension.php @@ -11,7 +11,7 @@ /** * Provides reCAPTCHA support to Twig views */ -class ReCaptchaExtension extends \Twig_Extension +class ReCaptchaExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface { /** * reCAPTCHA site key @@ -34,30 +34,14 @@ public function getName() { return 'reCAPTCHA'; } - /** - * Generates and returns the HTML code necessary for reCAPTCHA on a form - * @return string The HTML needed for a reCAPTCHA form element - */ - public function reCaptchaForm() { - return "
"; - } - - /** - * Returns the script necessary for - * @return string The HTML script tag needed for reCAPTCHA to function - */ - public function reCaptchaScript() { - return ''; - } - /** * {@inheritdoc} */ public function getGlobals() { return [ 'recaptcha' => [ - 'script' => $this->reCaptchaScript(), - 'form' => $this->reCaptchaForm(), + 'script' => '', + 'form' => '
', ], ]; }