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
|
|
|
|
2017-04-24 21:52:24 +05:30
|
|
|
use common\emails\Template;
|
2019-06-17 02:29:19 +05:30
|
|
|
use yii\base\InvalidCallException;
|
2017-04-21 04:11:43 +05:30
|
|
|
|
2019-06-17 02:29:19 +05:30
|
|
|
class ChangeEmail extends Template {
|
2017-04-21 04:11:43 +05:30
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
private ?string $key = null;
|
2017-04-21 04:11:43 +05:30
|
|
|
|
2019-06-17 02:29:19 +05:30
|
|
|
public function setKey(string $key): void {
|
2017-04-21 04:11:43 +05:30
|
|
|
$this->key = $key;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSubject(): string {
|
|
|
|
return 'Ely.by Account change E-mail confirmation';
|
|
|
|
}
|
|
|
|
|
2018-04-18 02:17:25 +05:30
|
|
|
public function getParams(): array {
|
2019-06-17 02:29:19 +05:30
|
|
|
if ($this->key === null) {
|
|
|
|
throw new InvalidCallException('You need to set key param first');
|
|
|
|
}
|
|
|
|
|
2018-04-18 02:17:25 +05:30
|
|
|
return [
|
|
|
|
'key' => $this->key,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
protected function getView(): array {
|
2017-04-21 04:11:43 +05:30
|
|
|
return [
|
2017-04-24 22:01:38 +05:30
|
|
|
'html' => '@common/emails/views/current-email-confirmation-html',
|
|
|
|
'text' => '@common/emails/views/current-email-confirmation-text',
|
2017-04-21 04:11:43 +05:30
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|