[04/03/2023] Ajout du module ReCaptcha et config
This commit is contained in:
60
local/modules/ReCaptcha/Config/config.xml
Normal file
60
local/modules/ReCaptcha/Config/config.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<config xmlns="http://thelia.net/schema/dic/config"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
|
||||
|
||||
<loops>
|
||||
<!-- sample definition
|
||||
<loop name="MySuperLoop" class="ReCaptcha\Loop\MySuperLoop" />
|
||||
-->
|
||||
</loops>
|
||||
|
||||
<forms>
|
||||
<form name="recaptcha_configuration.form" class="ReCaptcha\Form\ConfigurationForm" />
|
||||
</forms>
|
||||
|
||||
<commands>
|
||||
<!--
|
||||
<command class="ReCaptcha\Command\MySuperCommand" />
|
||||
-->
|
||||
</commands>
|
||||
|
||||
<services>
|
||||
<service id="recpatcha.action" class="ReCaptcha\Action\ReCaptchaAction">
|
||||
<tag name="kernel.event_subscriber" />
|
||||
<argument type="service" id="request"/>
|
||||
</service>
|
||||
<service id="thelia.form_validator" class="ReCaptcha\Form\MyTheliaFormValidator">
|
||||
<argument type="service" id="thelia.translator" />
|
||||
<argument>%kernel.environment%</argument>
|
||||
<argument type="service" id="event_dispatcher" />
|
||||
</service>
|
||||
<service id="recpatcha.action.contact" class="ReCaptcha\EventListeners\ContactFormListener">
|
||||
<tag name="kernel.event_subscriber" />
|
||||
</service>
|
||||
</services>
|
||||
|
||||
<hooks>
|
||||
<hook id="recaptcha.hook" class="ReCaptcha\Hook\HookManager">
|
||||
<tag name="hook.event_listener" event="main.head-top" type="front" method="loadRecaptcha" />
|
||||
<tag name="hook.event_listener" event="recaptcha.js" type="front" method="loadRecaptcha" />
|
||||
<tag name="hook.event_listener" event="recaptcha.check" type="front" method="addRecaptchaCheck" />
|
||||
<tag name="hook.event_listener" event="contact.form-bottom" type="front" method="addRecaptchaCheckContact" />
|
||||
|
||||
<tag name="hook.event_listener" event="module.configuration" type="back" method="onModuleConfigure" />
|
||||
</hook>
|
||||
</hooks>
|
||||
|
||||
<!--
|
||||
<exports>
|
||||
|
||||
</exports>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<imports>
|
||||
|
||||
</imports>
|
||||
-->
|
||||
</config>
|
||||
Reference in New Issue
Block a user