-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e436ca
commit 8133866
Showing
20 changed files
with
419 additions
and
467 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
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 |
---|---|---|
@@ -1,28 +1,26 @@ | ||
<?php | ||
|
||
namespace EWZ\Bundle\RecaptchaBundle\Factory; | ||
|
||
use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType; | ||
use EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrue; | ||
use Symfony\Component\Form\FormFactoryInterface; | ||
|
||
class EWZRecaptchaV2FormBuilderFactory | ||
{ | ||
|
||
private $builder; | ||
|
||
public function __construct(FormFactoryInterface $builder) | ||
{ | ||
$this->builder = $builder; | ||
} | ||
|
||
public function get() | ||
{ | ||
return $this->builder->createBuilder(EWZRecaptchaType::class, null, [ | ||
'constraints' => array( | ||
new IsTrue() | ||
) | ||
]); | ||
} | ||
|
||
} | ||
<?php | ||
|
||
namespace EWZ\Bundle\RecaptchaBundle\Factory; | ||
|
||
use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType; | ||
use EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrue; | ||
use Symfony\Component\Form\FormFactoryInterface; | ||
|
||
class EWZRecaptchaV2FormBuilderFactory | ||
{ | ||
private $builder; | ||
|
||
public function __construct(FormFactoryInterface $builder) | ||
{ | ||
$this->builder = $builder; | ||
} | ||
|
||
public function get() | ||
{ | ||
return $this->builder->createBuilder(EWZRecaptchaType::class, null, [ | ||
'constraints' => array( | ||
new IsTrue(), | ||
), | ||
]); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,30 +1,28 @@ | ||
<?php | ||
|
||
namespace EWZ\Bundle\RecaptchaBundle\Factory; | ||
|
||
use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaV3Type; | ||
use EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrueV3; | ||
use Symfony\Component\Form\FormFactoryInterface; | ||
|
||
class EWZRecaptchaV3FormBuilderFactory | ||
{ | ||
|
||
private $builder; | ||
|
||
public function __construct(FormFactoryInterface $builder) | ||
{ | ||
$this->builder = $builder; | ||
} | ||
|
||
public function get(array $options = array()) | ||
{ | ||
$constraint = array( | ||
'constraints' => array( | ||
new IsTrueV3() | ||
)); | ||
|
||
return $this->builder->createBuilder(EWZRecaptchaV3Type::class, null, array_merge($options, $constraint) | ||
); | ||
} | ||
|
||
} | ||
<?php | ||
|
||
namespace EWZ\Bundle\RecaptchaBundle\Factory; | ||
|
||
use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaV3Type; | ||
use EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrueV3; | ||
use Symfony\Component\Form\FormFactoryInterface; | ||
|
||
class EWZRecaptchaV3FormBuilderFactory | ||
{ | ||
private $builder; | ||
|
||
public function __construct(FormFactoryInterface $builder) | ||
{ | ||
$this->builder = $builder; | ||
} | ||
|
||
public function get(array $options = array()) | ||
{ | ||
$constraint = array( | ||
'constraints' => array( | ||
new IsTrueV3(), | ||
), ); | ||
|
||
return $this->builder->createBuilder(EWZRecaptchaV3Type::class, null, array_merge($options, $constraint) | ||
); | ||
} | ||
} |
Oops, something went wrong.