mirror of
https://github.com/elyby/accounts.git
synced 2024-10-31 07:53:02 +05:30
37 lines
904 B
PHP
37 lines
904 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace common\models\confirmations;
|
|
|
|
use common\models\EmailActivation;
|
|
use common\models\EmailActivationQuery;
|
|
use yii\helpers\ArrayHelper;
|
|
|
|
/**
|
|
* Behaviors:
|
|
* @mixin NewEmailConfirmationBehavior
|
|
*/
|
|
class NewEmailConfirmation extends EmailActivation {
|
|
|
|
public static function find(): EmailActivationQuery {
|
|
return parent::find()->withType(EmailActivation::TYPE_NEW_EMAIL_CONFIRMATION);
|
|
}
|
|
|
|
public function behaviors(): array {
|
|
return ArrayHelper::merge(parent::behaviors(), [
|
|
'expirationBehavior' => [
|
|
'repeatTimeout' => 5 * 60,
|
|
],
|
|
'dataBehavior' => [
|
|
'class' => NewEmailConfirmationBehavior::class,
|
|
],
|
|
]);
|
|
}
|
|
|
|
public function init(): void {
|
|
parent::init();
|
|
$this->type = EmailActivation::TYPE_NEW_EMAIL_CONFIRMATION;
|
|
}
|
|
|
|
}
|