5 Commits

Author SHA1 Message Date
53c25b2e9a Merge pull request #163 from hackzilla/master
Update CaptchaType.php
2016-02-02 23:40:33 +01:00
fcf8c4fd01 Update CaptchaType.php
add getBlockPrefix for Symfony3 compatibility.
2016-02-02 22:15:18 +00:00
e91cb1a3b7 Merge pull request #139 from RicoVZ/patch-1
Replaced usage of "pattern" with "path"
2015-12-30 19:19:50 +01:00
f06ff4d2c2 Clarification 2015-12-13 12:12:45 +01:00
ef281889ab Replaced usage of "pattern" with "path"
As described in issue #135
2015-08-18 09:48:41 +02:00
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,3 @@
gregwar_captcha.generate_captcha:
pattern: /generate-captcha/{key}
defaults: { _controller: GregwarCaptchaBundle:Captcha:generateCaptcha }
path: /generate-captcha/{key}
defaults: { _controller: GregwarCaptchaBundle:Captcha:generateCaptcha }

View File

@ -143,7 +143,7 @@ class CaptchaType extends AbstractType
*/
public function getParent()
{
// Not using ::class to support Symfony 2.8 w/ php<5.5
// Not using ::class to support Symfony 2.8 w/ php>=5.3.9
return 'Symfony\Component\Form\Extension\Core\Type\TextType';
}
@ -151,6 +151,14 @@ class CaptchaType extends AbstractType
* @return string
*/
public function getName()
{
return $this->getBlockPrefix();
}
/**
* @return string
*/
public function getBlockPrefix()
{
return 'captcha';
}