Компонент для email'ов перемещён в common

This commit is contained in:
ErickSkrauch
2017-04-24 19:22:24 +03:00
parent c0780736ca
commit 1d5e0ce2c6
15 changed files with 30 additions and 30 deletions

View 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(),
];
}
}