-
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.
Merge pull request #4 from Pixel-Open/release/100.2.0
Release/100.2.0
- Loading branch information
Showing
44 changed files
with
1,130 additions
and
243 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Copyright (C) 2023 Pixel Développement | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PixelOpen\CloudflareTurnstile\Model\Config\Source\Forms; | ||
|
||
use PixelOpen\CloudflareTurnstile\Model\Config\Source\Forms; | ||
|
||
class Adminhtml extends Forms | ||
{ | ||
public const FORM_LOGIN = 'login'; | ||
public const FORM_PASSWORD = 'password'; | ||
|
||
public function toArray(): array | ||
{ | ||
return [ | ||
self::FORM_LOGIN, | ||
self::FORM_PASSWORD, | ||
]; | ||
} | ||
} |
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,35 @@ | ||
<?php | ||
/** | ||
* Copyright (C) 2023 Pixel Développement | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PixelOpen\CloudflareTurnstile\Model\Config\Source\Forms; | ||
|
||
use PixelOpen\CloudflareTurnstile\Model\Config\Source\Forms; | ||
|
||
class Frontend extends Forms | ||
{ | ||
public const FORM_CONTACT = 'contact'; | ||
public const FORM_REGISTER = 'register'; | ||
public const FORM_LOGIN = 'login'; | ||
public const FORM_LOGIN_AJAX = 'login-ajax'; | ||
public const FORM_PASSWORD = 'password'; | ||
public const FORM_REVIEW = 'review'; | ||
|
||
public function toArray(): array | ||
{ | ||
return [ | ||
self::FORM_CONTACT, | ||
self::FORM_REGISTER, | ||
self::FORM_LOGIN, | ||
self::FORM_LOGIN_AJAX, | ||
self::FORM_PASSWORD, | ||
self::FORM_REVIEW, | ||
]; | ||
} | ||
} |
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,48 @@ | ||
<?php | ||
/** | ||
* Copyright (C) 2023 Pixel Développement | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PixelOpen\CloudflareTurnstile\Model\Config\Source; | ||
|
||
use Magento\Framework\Data\OptionSourceInterface; | ||
|
||
class Size implements OptionSourceInterface | ||
{ | ||
public const SIZE_NORMAL = 'normal'; | ||
public const SIZE_COMPACT = 'compact'; | ||
|
||
/** | ||
* Get options as array | ||
* | ||
* @return string[][] | ||
*/ | ||
public function toOptionArray(): array | ||
{ | ||
$options = []; | ||
|
||
foreach ($this->toArray() as $value) { | ||
$options[] = [ | ||
'value' => $value, | ||
'label' => $value, | ||
]; | ||
} | ||
|
||
return $options; | ||
} | ||
|
||
/** | ||
* Get options as array | ||
* | ||
* @return string[] | ||
*/ | ||
public function toArray(): array | ||
{ | ||
return [self::SIZE_NORMAL, self::SIZE_COMPACT]; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/** | ||
* Copyright (C) 2023 Pixel Développement | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PixelOpen\CloudflareTurnstile\Model\Turnstile; | ||
|
||
interface ConfigProviderInterface | ||
{ | ||
/** | ||
* Retrieve assoc array of turnstile configuration | ||
* | ||
* @return array | ||
*/ | ||
public function getConfig(): array; | ||
} |
Oops, something went wrong.