-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: Allow to store
sitekey
and secret
in Settings.yaml
You can predefine the secret and sitekey in Settings.yaml. If no specific values are given in the form the captcha-element will fallback to those values.
- Loading branch information
Showing
5 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
Classes/Gerdemann/ReCAPTCHA/FormElements/ReCAPTCHAFormElement.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
namespace Gerdemann\ReCAPTCHA\FormElements; | ||
|
||
use Neos\Flow\Annotations as Flow; | ||
use Neos\Form\Core\Model\AbstractFormElement; | ||
|
||
class ReCAPTCHAFormElement extends AbstractFormElement | ||
{ | ||
/** | ||
* @var string | ||
* @Flow\InjectConfiguration(package="Gerdemann.ReCAPTCHA", path="sitekey") | ||
*/ | ||
protected $sitekey; | ||
|
||
/** | ||
* @return string|null the site key from the settings | ||
*/ | ||
public function getSiteKey() | ||
{ | ||
return $this->sitekey; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters