| @@ 15-42 (lines=28) @@ | ||
| 12 | use eZ\Publish\API\Repository\Values\Content\VersionInfo; |
|
| 13 | use eZ\Publish\Core\Event\BeforeEvent; |
|
| 14 | ||
| 15 | final class BeforeDeleteRelationEvent extends BeforeEvent |
|
| 16 | { |
|
| 17 | /** @var \eZ\Publish\API\Repository\Values\Content\VersionInfo */ |
|
| 18 | private $sourceVersion; |
|
| 19 | ||
| 20 | /** @var \eZ\Publish\API\Repository\Values\Content\ContentInfo */ |
|
| 21 | private $destinationContent; |
|
| 22 | ||
| 23 | public function __construct(VersionInfo $sourceVersion, ContentInfo $destinationContent) |
|
| 24 | { |
|
| 25 | $this->sourceVersion = $sourceVersion; |
|
| 26 | $this->destinationContent = $destinationContent; |
|
| 27 | } |
|
| 28 | ||
| 29 | public function getSourceVersion(): VersionInfo |
|
| 30 | { |
|
| 31 | return $this->sourceVersion; |
|
| 32 | } |
|
| 33 | ||
| 34 | public function getDestinationContent(): ContentInfo |
|
| 35 | { |
|
| 36 | return $this->destinationContent; |
|
| 37 | } |
|
| 38 | } |
|
| 39 | ||
| @@ 15-44 (lines=30) @@ | ||
| 12 | use eZ\Publish\API\Repository\Values\Content\VersionInfo; |
|
| 13 | use eZ\Publish\Core\Event\AfterEvent; |
|
| 14 | ||
| 15 | final class DeleteRelationEvent extends AfterEvent |
|
| 16 | { |
|
| 17 | /** @var \eZ\Publish\API\Repository\Values\Content\VersionInfo */ |
|
| 18 | private $sourceVersion; |
|
| 19 | ||
| 20 | /** @var \eZ\Publish\API\Repository\Values\Content\ContentInfo */ |
|
| 21 | private $destinationContent; |
|
| 22 | ||
| 23 | public function __construct( |
|
| 24 | VersionInfo $sourceVersion, |
|
| 25 | ContentInfo $destinationContent |
|
| 26 | ) { |
|
| 27 | $this->sourceVersion = $sourceVersion; |
|
| 28 | $this->destinationContent = $destinationContent; |
|
| 29 | } |
|
| 30 | ||
| 31 | public function getSourceVersion(): VersionInfo |
|
| 32 | { |
|
| 33 | return $this->sourceVersion; |
|
| 34 | } |
|
| 35 | ||
| 36 | public function getDestinationContent(): ContentInfo |
|
| 37 | { |
|
| 38 | return $this->destinationContent; |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||