first commit
This commit is contained in:
commit
e81864e683
2984 files changed
+267797
No files matched your search
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
class AdminConfirmationUserEvent extends UserEvent
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Service\SendMailService;
|
||||
use Symfony\Component\Mime\Email;
|
||||
|
||||
class AfterMailSendEvent
|
||||
{
|
||||
/**
|
||||
* @var Email
|
||||
*/
|
||||
private $email;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $variables;
|
||||
/**
|
||||
* @var SendMailService
|
||||
*/
|
||||
private $service;
|
||||
|
||||
public function __construct(Email $email, array $variables, SendMailService $service)
|
||||
{
|
||||
$this->email = $email;
|
||||
$this->variables = $variables;
|
||||
$this->service = $service;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Email
|
||||
*/
|
||||
public function getEmail(): Email
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SendMailService
|
||||
*/
|
||||
public function getService(): SendMailService
|
||||
{
|
||||
return $this->service;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getVariables(): array
|
||||
{
|
||||
return $this->variables;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Model\User;
|
||||
|
||||
class AfterUserUpdateEvent extends UserEvent
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $hash;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $status;
|
||||
|
||||
public function __construct(User $user, string $hash, string $status)
|
||||
{
|
||||
parent::__construct($user);
|
||||
$this->hash = $hash;
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus(): string
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getHash(): string
|
||||
{
|
||||
return $this->hash;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Service\SendMailService;
|
||||
use TYPO3\CMS\Fluid\View\StandaloneView;
|
||||
|
||||
class BeforeMailBodyRenderEvent
|
||||
{
|
||||
/**
|
||||
* @var StandaloneView
|
||||
*/
|
||||
private $standAloneView;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $variables;
|
||||
/**
|
||||
* @var SendMailService
|
||||
*/
|
||||
private $service;
|
||||
|
||||
public function __construct(StandaloneView $standAloneView, array $variables, SendMailService $service)
|
||||
{
|
||||
$this->standAloneView = $standAloneView;
|
||||
$this->variables = $variables;
|
||||
$this->service = $service;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return StandaloneView
|
||||
*/
|
||||
public function getStandaloneView(): StandaloneView
|
||||
{
|
||||
return $this->standAloneView;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SendMailService
|
||||
*/
|
||||
public function getService(): SendMailService
|
||||
{
|
||||
return $this->service;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getVariables(): array
|
||||
{
|
||||
return $this->variables;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param StandaloneView $standAloneView
|
||||
*/
|
||||
public function setStandaloneView(StandaloneView $standAloneView): void
|
||||
{
|
||||
$this->standAloneView = $standAloneView;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Service\SendMailService;
|
||||
use Symfony\Component\Mime\Email;
|
||||
|
||||
class BeforeMailSendEvent
|
||||
{
|
||||
/**
|
||||
* @var Email
|
||||
*/
|
||||
private $email;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $variables;
|
||||
/**
|
||||
* @var SendMailService
|
||||
*/
|
||||
private $service;
|
||||
|
||||
public function __construct(Email $email, array $variables, SendMailService $service)
|
||||
{
|
||||
$this->email = $email;
|
||||
$this->variables = $variables;
|
||||
$this->service = $service;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Email
|
||||
*/
|
||||
public function getEmail(): Email
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SendMailService
|
||||
*/
|
||||
public function getService(): SendMailService
|
||||
{
|
||||
return $this->service;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getVariables(): array
|
||||
{
|
||||
return $this->variables;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Email $email
|
||||
*/
|
||||
public function setEmail(Email $email): void
|
||||
{
|
||||
$this->email = $email;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
class BeforeUpdateUserEvent extends UserEvent
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Model\User;
|
||||
|
||||
class BeforeUserConfirmEvent
|
||||
{
|
||||
/**
|
||||
* @var User|null
|
||||
*/
|
||||
private $user;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $hash;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $status;
|
||||
|
||||
public function __construct(
|
||||
?User $user,
|
||||
string $hash,
|
||||
string $status
|
||||
) {
|
||||
$this->user = $user;
|
||||
$this->hash = $hash;
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return User|null
|
||||
*/
|
||||
public function getUser(): ?User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getHash(): string
|
||||
{
|
||||
return $this->hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus(): string
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
class BeforeUserCreateEvent extends UserEvent
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Model\User;
|
||||
|
||||
class CreateConfirmationRequestEvent extends UserEvent
|
||||
{
|
||||
public const MODE_AUTOMATIC = 'automatic';
|
||||
|
||||
public const MODE_MANUAL = 'manual';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $mode;
|
||||
|
||||
public function __construct(User $user, string $mode)
|
||||
{
|
||||
parent::__construct($user);
|
||||
$this->mode = $mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMode(): string
|
||||
{
|
||||
return $this->mode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
class DeleteUserEvent extends UserEvent
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Model\User;
|
||||
|
||||
class FinalCreateEvent extends UserEvent
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $action;
|
||||
|
||||
public function __construct(?User $user, string $action)
|
||||
{
|
||||
parent::__construct($user);
|
||||
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
public function getAction(): string
|
||||
{
|
||||
return $this->action;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
class FinalUpdateEvent extends UserEvent
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
class ImpersonateEvent extends UserEvent
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
class InviteUserConfirmedEvent extends UserEvent
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
class InviteUserCreateEvent extends UserEvent
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Model\User;
|
||||
|
||||
class InviteUserEditEvent extends UserEvent
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $hash;
|
||||
|
||||
public function __construct(?User $user, string $hash)
|
||||
{
|
||||
parent::__construct($user);
|
||||
|
||||
$this->hash = $hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getHash(): string
|
||||
{
|
||||
return $this->hash;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
class InviteUserUpdateEvent extends UserEvent
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
class RefuseUserEvent extends UserEvent
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Model\User;
|
||||
|
||||
class UniqueUserEvent
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $emailOrUsername;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $fieldName;
|
||||
/**
|
||||
* @var User|null
|
||||
*/
|
||||
private $user;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $unique;
|
||||
|
||||
public function __construct(
|
||||
string $emailOrUsername,
|
||||
string $fieldName,
|
||||
?User $user,
|
||||
bool $unique
|
||||
) {
|
||||
$this->emailOrUsername = $emailOrUsername;
|
||||
$this->fieldName = $fieldName;
|
||||
$this->user = $user;
|
||||
$this->unique = $unique;
|
||||
}
|
||||
|
||||
public function setUnique(bool $unique): void
|
||||
{
|
||||
$this->unique = $unique;
|
||||
}
|
||||
|
||||
public function isUnique(): bool
|
||||
{
|
||||
return $this->unique;
|
||||
}
|
||||
|
||||
public function getEmailOrUsername(): string
|
||||
{
|
||||
return $this->emailOrUsername;
|
||||
}
|
||||
|
||||
public function getFieldName(): string
|
||||
{
|
||||
return $this->fieldName;
|
||||
}
|
||||
|
||||
public function getUser(): ?User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Model\User;
|
||||
|
||||
class UserEvent
|
||||
{
|
||||
protected $user;
|
||||
|
||||
public function __construct(?User $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
public function getUser(): ?User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace In2code\Femanager\Event;
|
||||
|
||||
use In2code\Femanager\Domain\Model\User;
|
||||
|
||||
class UserLogEvent extends UserEvent
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $state;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $additionalProperties;
|
||||
|
||||
public function __construct(?User $user, int $state, array $additionalProperties = [])
|
||||
{
|
||||
parent::__construct($user);
|
||||
|
||||
$this->state = $state;
|
||||
$this->additionalProperties = $additionalProperties;
|
||||
}
|
||||
|
||||
public function getAdditionalProperties(): array
|
||||
{
|
||||
return $this->additionalProperties;
|
||||
}
|
||||
|
||||
public function getState(): int
|
||||
{
|
||||
return $this->state;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user