added event to send email to user (#5034)
This commit is contained in:
@@ -11,12 +11,17 @@ namespace App\Event;
|
||||
|
||||
use App\Entity\User;
|
||||
use Symfony\Component\Mime\Email;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
class UserEmailEvent extends EmailEvent
|
||||
class UserEmailEvent extends Event
|
||||
{
|
||||
public function __construct(private User $user, Email $email)
|
||||
public function __construct(private readonly User $user, private readonly Email $email)
|
||||
{
|
||||
parent::__construct($email);
|
||||
}
|
||||
|
||||
public function getEmail(): Email
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
public function getUser(): User
|
||||
|
||||
Reference in New Issue
Block a user