5 Commits

Author SHA1 Message Date
df6915eb5e README details 2020-04-28 10:45:36 +02:00
b7685e63a1 README indentation 2020-04-28 10:44:39 +02:00
15bee25e9c Indentation in README 2020-04-28 10:43:03 +02:00
3a4e31473a Adding some note about session_key option for multiple captcha on same
page
2020-04-17 16:13:37 +02:00
fec0ebb2f1 Autowire controller 2020-04-09 10:18:10 +02:00
2 changed files with 29 additions and 25 deletions

View File

@ -101,6 +101,7 @@ number of lines depends on the size of the image). (default=null)
* **background_images**: Sets custom user defined images as the captcha background (1 image is selected randomly). It is recommended to turn off all the effects on the image (ignore_all_effects). The full paths to the images must be passed.
* **interpolation**: enable or disable the interpolation on the captcha
* **ignore_all_effects**: Recommended to use when setting background images, will disable all image effects.
* **session_key**, if you want to host multiple CAPTCHA on the same page, you might have different session keys to ensure proper storage of the clear phrase for those different forms
Example :
@ -131,13 +132,15 @@ The messages are using the translator, you can either change the `invalid_messag
As URL
============
To use a URL to generate a captcha image, you must add the bundle's routing configuration to your app/routing.yml file:
To use a URL to generate a captcha image, you must add the bundle's routing configuration to your `config/routes.yaml` file:
``` yaml
gregwar_captcha_routing:
resource: "@GregwarCaptchaBundle/Resources/config/routing/routing.yml"
```
This will use the bundle's route of "/generate-captcha/{key}" to handle the generation. If this route conflicts with an application route, you can prefix the bundle's routes when you import:
This will use the bundle's route of `/generate-captcha/{key}` to handle the generation. If this route conflicts with an application route, you can prefix the bundle's routes when you import:
``` yaml
gregwar_captcha_routing:
resource: "@GregwarCaptchaBundle/Resources/config/routing/routing.yml"

View File

@ -17,6 +17,7 @@ services:
arguments:
- '@gregwar_captcha.generator'
- '%gregwar_captcha.config%'
autowire: true
# captcha.type:
gregwar_captcha.type: