Add URL generation method and update to Symfony 2.1 standards
This commit is contained in:
3
Resources/config/routing/routing.yml
Normal file
3
Resources/config/routing/routing.yml
Normal file
@ -0,0 +1,3 @@
|
||||
gregwar_captcha.generate_captcha:
|
||||
pattern: %gregwar_captcha.config.url%
|
||||
defaults: { _controller: GregwarCaptchaBundle:Captcha:generateCaptcha }
|
@ -3,6 +3,19 @@ services:
|
||||
# captcha type
|
||||
captcha.type:
|
||||
class: Gregwar\CaptchaBundle\Type\CaptchaType
|
||||
arguments: [ "@session", %gregwar_captcha.config% ]
|
||||
arguments:
|
||||
- @session
|
||||
- @gregwar_captcha.generator
|
||||
- %gregwar_captcha.config%
|
||||
tags:
|
||||
- { name: form.type, alias: captcha }
|
||||
|
||||
gregwar_captcha.generator:
|
||||
class: Gregwar\CaptchaBundle\Generator\CaptchaGenerator
|
||||
arguments:
|
||||
- @session
|
||||
- %gregwar_captcha.config.image_folder%
|
||||
- %gregwar_captcha.config.web_path%
|
||||
- %gregwar_captcha.config.gc_freq%
|
||||
- %gregwar_captcha.config.expiration%
|
||||
- %gregwar_captcha.config.url%
|
||||
|
Reference in New Issue
Block a user