-
Notifications
You must be signed in to change notification settings - Fork 60
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
Showing
16 changed files
with
263 additions
and
45 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,44 @@ | ||
<?php | ||
|
||
namespace Solspace\Freeform\Events\Forms; | ||
|
||
use Solspace\Freeform\Elements\Submission; | ||
use Solspace\Freeform\Library\Composer\Components\Form; | ||
use yii\base\Event; | ||
|
||
class AfterSubmitEvent extends Event | ||
{ | ||
/** @var Form */ | ||
private $form; | ||
|
||
/** @var Submission */ | ||
private $submission; | ||
|
||
/** | ||
* @param Form $form | ||
* @param Submission|null $submission | ||
*/ | ||
public function __construct(Form $form, Submission $submission = null) | ||
{ | ||
$this->form = $form; | ||
$this->submission = $submission; | ||
|
||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* @return Form | ||
*/ | ||
public function getForm(): Form | ||
{ | ||
return $this->form; | ||
} | ||
|
||
/** | ||
* @return Submission|null | ||
*/ | ||
public function getSubmission() | ||
{ | ||
return $this->submission; | ||
} | ||
} |
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,30 @@ | ||
<?php | ||
|
||
namespace Solspace\Freeform\Events\Forms; | ||
|
||
use craft\events\CancelableEvent; | ||
use Solspace\Freeform\Library\Composer\Components\Form; | ||
|
||
class BeforeSubmitEvent extends CancelableEvent | ||
{ | ||
/** @var Form */ | ||
private $form; | ||
|
||
/** | ||
* @param Form $form | ||
*/ | ||
public function __construct(Form $form) | ||
{ | ||
$this->form = $form; | ||
|
||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* @return Form | ||
*/ | ||
public function getForm(): Form | ||
{ | ||
return $this->form; | ||
} | ||
} |
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
Oops, something went wrong.