add to project email

This commit is contained in:
2024-02-06 18:01:05 +03:00
parent ea588a8aee
commit 4845f7944b
4 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,10 @@
<?php
/* @var $this yii\web\View */
/* @var $user common\models\User */
/* @var $project \common\models\Project */
?>
<p>Здравствуйте, <b><?= $user->username ?></b>,</p>
Вас добавили в проект <a href="https://itguild.info/tracker/project/<?= $project->id ?>"><?= $project->name ?></a> .

View File

@ -0,0 +1 @@
<?php

View File

@ -0,0 +1,25 @@
<?php
namespace common\models\email;
use common\models\Project;
use common\models\ProjectUser;
use common\models\User;
use Yii;
class AddToProjectEmail extends Email
{
/**
* @param User $user
* @param Project $project
*/
public function __construct(User $user, Project $project)
{
$this->sendTo = $user->email;
$this->subject = 'Вас добавили в проект';
$this->mailLayout = ['html' => 'addToProjectByEmail-html', 'text' => 'addToProjectByEmail-text'];
$this->params = ['user' => $user, 'project' => $project];
}
}