2017-04-21 04:11:43 +05:30
|
|
|
<?php
|
2019-06-07 04:46:13 +05:30
|
|
|
declare(strict_types=1);
|
|
|
|
|
2017-04-24 21:52:24 +05:30
|
|
|
namespace common\emails\templates;
|
2017-04-21 04:11:43 +05:30
|
|
|
|
2019-06-07 04:46:13 +05:30
|
|
|
use common\components\EmailsRenderer\RendererInterface;
|
2017-04-24 21:52:24 +05:30
|
|
|
use common\emails\TemplateWithRenderer;
|
2017-04-21 04:11:43 +05:30
|
|
|
|
|
|
|
class RegistrationEmail extends TemplateWithRenderer {
|
|
|
|
|
|
|
|
private $params;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
2019-06-07 04:46:13 +05:30
|
|
|
public function __construct($to, string $locale, RegistrationEmailParams $params, RendererInterface $renderer) {
|
|
|
|
parent::__construct($to, $locale, $renderer);
|
2017-04-21 04:11:43 +05:30
|
|
|
$this->params = $params;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSubject(): string {
|
|
|
|
return 'Ely.by Account registration';
|
|
|
|
}
|
|
|
|
|
2017-04-25 04:39:59 +05:30
|
|
|
public function getTemplateName(): string {
|
2017-04-21 04:11:43 +05:30
|
|
|
return 'register';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getParams(): array {
|
|
|
|
return [
|
|
|
|
'username' => $this->params->getUsername(),
|
|
|
|
'code' => $this->params->getCode(),
|
|
|
|
'link' => $this->params->getLink(),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|