mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Компонент для email'ов перемещён в common
This commit is contained in:
34
common/emails/templates/RegistrationEmail.php
Normal file
34
common/emails/templates/RegistrationEmail.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace common\emails\templates;
|
||||
|
||||
use common\emails\TemplateWithRenderer;
|
||||
|
||||
class RegistrationEmail extends TemplateWithRenderer {
|
||||
|
||||
private $params;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function __construct($to, string $locale, RegistrationEmailParams $params) {
|
||||
TemplateWithRenderer::__construct($to, $locale);
|
||||
$this->params = $params;
|
||||
}
|
||||
|
||||
public function getSubject(): string {
|
||||
return 'Ely.by Account registration';
|
||||
}
|
||||
|
||||
protected function getTemplateName(): string {
|
||||
return 'register';
|
||||
}
|
||||
|
||||
public function getParams(): array {
|
||||
return [
|
||||
'username' => $this->params->getUsername(),
|
||||
'code' => $this->params->getCode(),
|
||||
'link' => $this->params->getLink(),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user