| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | namespace Aurora\Modules\RecaptchaWebclientPlugin; |
| 9: | |
| 10: | use Aurora\System\SettingsProperty; |
| 11: | use Aurora\Modules\RecaptchaWebclientPlugin\Enums; |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | class Settings extends \Aurora\System\Module\Settings |
| 25: | { |
| 26: | protected function initDefaults() |
| 27: | { |
| 28: | $this->aContainer = [ |
| 29: | "Disabled" => new SettingsProperty( |
| 30: | false, |
| 31: | "bool", |
| 32: | null, |
| 33: | "Setting to true disables the module", |
| 34: | ), |
| 35: | "PublicKey" => new SettingsProperty( |
| 36: | "", |
| 37: | "string", |
| 38: | null, |
| 39: | "Public key obtained at reCAPTCHA website", |
| 40: | ), |
| 41: | "PrivateKey" => new SettingsProperty( |
| 42: | "", |
| 43: | "string", |
| 44: | null, |
| 45: | "Private key obtained at reCAPTCHA website", |
| 46: | ), |
| 47: | "LimitCount" => new SettingsProperty( |
| 48: | 0, |
| 49: | "int", |
| 50: | null, |
| 51: | "Denotes number of unsuccessful login attempts required for CAPTCHA to be displayed, 0 - always displayed", |
| 52: | ), |
| 53: | "WhitelistIPs" => new SettingsProperty( |
| 54: | [], |
| 55: | "array", |
| 56: | null, |
| 57: | "List of IP addresses CAPTCHA is never be displayed for", |
| 58: | ), |
| 59: | "IncludeInMobile" => new SettingsProperty( |
| 60: | true, |
| 61: | "bool", |
| 62: | null, |
| 63: | "If true, the module is used in mobile version of the interface", |
| 64: | ), |
| 65: | "IncludeInDesktop" => new SettingsProperty( |
| 66: | true, |
| 67: | "bool", |
| 68: | null, |
| 69: | "If true, the module is used in desktop version of the interface", |
| 70: | ), |
| 71: | "RequestMethod" => new SettingsProperty( |
| 72: | Enums\RequestMethods::SocketPost, |
| 73: | "spec", |
| 74: | Enums\RequestMethods::class, |
| 75: | "Request method used by API", |
| 76: | ), |
| 77: | ]; |
| 78: | } |
| 79: | } |
| 80: | |