-
Notifications
You must be signed in to change notification settings - Fork 6
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 #108 from dionsnoeijen/update-events
Updating events
- Loading branch information
Showing
22 changed files
with
395 additions
and
125 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the SexyField package. | ||
* | ||
* (c) Dion Snoeijen <hallo@dionsnoeijen.nl> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare (strict_types = 1); | ||
|
||
namespace Tardigrades\SectionField\Event; | ||
|
||
use Throwable; | ||
|
||
class BeforeCreateAbortedException extends \Exception | ||
{ | ||
public function __construct( | ||
$message = "Aborted before create", | ||
$code = 0, | ||
Throwable $previous = null | ||
) { | ||
parent::__construct($message, $code, $previous); | ||
} | ||
} |
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 | ||
|
||
/* | ||
* This file is part of the SexyField package. | ||
* | ||
* (c) Dion Snoeijen <hallo@dionsnoeijen.nl> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare (strict_types = 1); | ||
|
||
namespace Tardigrades\SectionField\Event; | ||
|
||
use Throwable; | ||
|
||
class BeforeDeleteAbortedException extends \Exception | ||
{ | ||
public function __construct( | ||
$message = "Aborted before delete", | ||
$code = 0, | ||
Throwable $previous = null | ||
) { | ||
parent::__construct($message, $code, $previous); | ||
} | ||
} |
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 | ||
|
||
/* | ||
* This file is part of the SexyField package. | ||
* | ||
* (c) Dion Snoeijen <hallo@dionsnoeijen.nl> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare (strict_types = 1); | ||
|
||
namespace Tardigrades\SectionField\Event; | ||
|
||
use Throwable; | ||
|
||
class BeforeReadAbortedException extends \Exception | ||
{ | ||
public function __construct( | ||
$message = "Aborted before read", | ||
$code = 0, | ||
Throwable $previous = null | ||
) { | ||
parent::__construct($message, $code, $previous); | ||
} | ||
} |
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 | ||
|
||
/* | ||
* This file is part of the SexyField package. | ||
* | ||
* (c) Dion Snoeijen <hallo@dionsnoeijen.nl> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare (strict_types = 1); | ||
|
||
namespace Tardigrades\SectionField\Event; | ||
|
||
use Throwable; | ||
|
||
class BeforeUpdateAbortedException extends \Exception | ||
{ | ||
public function __construct( | ||
$message = "Aborted before update", | ||
$code = 0, | ||
Throwable $previous = null | ||
) { | ||
parent::__construct($message, $code, $previous); | ||
} | ||
} |
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,47 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the SexyField package. | ||
* | ||
* (c) Dion Snoeijen <hallo@dionsnoeijen.nl> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare (strict_types = 1); | ||
|
||
namespace Tardigrades\SectionField\Event; | ||
|
||
use Symfony\Component\EventDispatcher\Event; | ||
use Tardigrades\SectionField\Generator\CommonSectionInterface; | ||
|
||
class SectionEntryBeforeDelete extends Event | ||
{ | ||
/** @var CommonSectionInterface */ | ||
private $entry; | ||
|
||
/** @var bool */ | ||
private $aborted = false; | ||
|
||
public function __construct( | ||
CommonSectionInterface $entry | ||
) { | ||
$this->entry = $entry; | ||
} | ||
|
||
public function getEntry(): CommonSectionInterface | ||
{ | ||
return $this->entry; | ||
} | ||
|
||
public function abort(): void | ||
{ | ||
$this->aborted = true; | ||
} | ||
|
||
public function aborted(): bool | ||
{ | ||
return $this->aborted; | ||
} | ||
} |
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,46 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the SexyField package. | ||
* | ||
* (c) Dion Snoeijen <hallo@dionsnoeijen.nl> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare (strict_types = 1); | ||
|
||
namespace Tardigrades\SectionField\Event; | ||
|
||
use Symfony\Component\EventDispatcher\Event; | ||
use Tardigrades\SectionField\Generator\CommonSectionInterface; | ||
|
||
class SectionEntryBeforeUpdate extends Event | ||
{ | ||
/** @var CommonSectionInterface */ | ||
protected $entry; | ||
|
||
/** @var bool */ | ||
private $aborted = false; | ||
|
||
public function __construct(CommonSectionInterface $entry) | ||
{ | ||
$this->entry = $entry; | ||
} | ||
|
||
public function getEntry(): CommonSectionInterface | ||
{ | ||
return $this->entry; | ||
} | ||
|
||
public function abort(): void | ||
{ | ||
$this->aborted = true; | ||
} | ||
|
||
public function aborted(): bool | ||
{ | ||
return $this->aborted; | ||
} | ||
} |
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.