-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProductVotedEvent.php
More file actions
37 lines (31 loc) · 927 Bytes
/
ProductVotedEvent.php
File metadata and controls
37 lines (31 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Copyright © . All rights reserved.
* See LICENSE file for license details.
*/
declare(strict_types=1);
namespace OxidEsales\ExamplesModule\ProductVote\Event;
use OxidEsales\ExamplesModule\ProductVote\DataObject\ProductVoteInterface;
use Symfony\Contracts\EventDispatcher\Event;
/**
* Event dispatched after a product vote has been set.
* This is an example of a custom module event that allows other modules
* or extensions to react to product voting actions.
*
* Use cases for subscribers:
* - Send notifications
* - Update statistics
* - Trigger external integrations
* - Log voting activity
*/
final class ProductVotedEvent extends Event implements ProductVotedEventInterface
{
public function __construct(
private readonly ProductVoteInterface $productVote
) {
}
public function getProductVote(): ProductVoteInterface
{
return $this->productVote;
}
}