| 1 | <?php |
||
| 10 | class CaptchaRuntime |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var \Netgen\InformationCollection\API\Service\CaptchaService |
||
| 14 | */ |
||
| 15 | protected $captcha; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * CaptchaRuntime constructor. |
||
| 19 | * |
||
| 20 | * @param \Netgen\InformationCollection\API\Service\CaptchaService $captcha |
||
| 21 | */ |
||
| 22 | public function __construct(CaptchaService $captcha) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Checks if captcha is enabled for given Location. |
||
| 29 | * |
||
| 30 | * @param \eZ\Publish\API\Repository\Values\Content\Location $location |
||
| 31 | * |
||
| 32 | * @return bool |
||
| 33 | */ |
||
| 34 | public function isEnabled(Location $location): bool |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Return configured site key for given Location. |
||
| 41 | * |
||
| 42 | * @param \eZ\Publish\API\Repository\Values\Content\Location $location |
||
| 43 | * |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public function getSiteKey(Location $location): string |
||
| 50 | } |
||
| 51 |