Skip to content

Commit

Permalink
Merge pull request #8 from stephane-fillion/compatibility_typo312
Browse files Browse the repository at this point in the history
TYPO3 12 Compatiblity
Restructuring
Use PSR14 for event
Abandoning the captcha element
  • Loading branch information
stephane-fillion committed Jan 5, 2024
2 parents 7fd6ee3 + 9330c4c commit 2b0c17f
Show file tree
Hide file tree
Showing 113 changed files with 2,991 additions and 25,960 deletions.
34 changes: 0 additions & 34 deletions Classes/Constraints/Captcha.php

This file was deleted.

21 changes: 6 additions & 15 deletions Classes/Constraints/ConstraintAbstract.php
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
<?php

declare(strict_types=1);

namespace Ameos\AmeosForm\Constraints;

/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use Ameos\AmeosForm\Elements\ElementAbstract;

abstract class ConstraintAbstract implements \Ameos\AmeosForm\Constraints\ConstraintInterface
abstract class ConstraintAbstract implements ConstraintInterface
{
/**
* @var string $message message
Expand All @@ -33,7 +24,7 @@ abstract class ConstraintAbstract implements \Ameos\AmeosForm\Constraints\Constr
protected $form;

/**
* @var \Ameos\AmeosForm\Elements\ElementAbstract $element element
* @var ElementAbstract $element element
*/
protected $element;

Expand All @@ -46,7 +37,7 @@ abstract class ConstraintAbstract implements \Ameos\AmeosForm\Constraints\Constr
public function __construct($message, $configuration, $element, $form)
{
$this->configuration = $configuration;
$this->message = $form->stringUtility->smart($message);
$this->message = $message;
$this->element = $element;
$this->form = $form;
}
Expand Down
15 changes: 2 additions & 13 deletions Classes/Constraints/ConstraintInterface.php
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
<?php

namespace Ameos\AmeosForm\Constraints;
declare(strict_types=1);

/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace Ameos\AmeosForm\Constraints;

interface ConstraintInterface
{
Expand Down
19 changes: 3 additions & 16 deletions Classes/Constraints/Custom.php
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
<?php

namespace Ameos\AmeosForm\Constraints;

/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
declare(strict_types=1);

use TYPO3\CMS\Core\Utility\GeneralUtility;
namespace Ameos\AmeosForm\Constraints;

class Custom extends \Ameos\AmeosForm\Constraints\ConstraintAbstract
class Custom extends ConstraintAbstract
{
/**
* return true if the element is valide
Expand Down
17 changes: 3 additions & 14 deletions Classes/Constraints/Email.php
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
<?php

namespace Ameos\AmeosForm\Constraints;
declare(strict_types=1);

/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace Ameos\AmeosForm\Constraints;

use TYPO3\CMS\Core\Utility\GeneralUtility;

class Email extends \Ameos\AmeosForm\Constraints\ConstraintAbstract
class Email extends ConstraintAbstract
{
/**
* return true if the element is valide
Expand Down
17 changes: 3 additions & 14 deletions Classes/Constraints/Fileextension.php
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
<?php

namespace Ameos\AmeosForm\Constraints;
declare(strict_types=1);

/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace Ameos\AmeosForm\Constraints;

use TYPO3\CMS\Core\Utility\GeneralUtility;

class Fileextension extends \Ameos\AmeosForm\Constraints\ConstraintAbstract
class Fileextension extends ConstraintAbstract
{
/**
* return true if the element is valide
Expand Down

0 comments on commit 2b0c17f

Please sign in to comment.