class SasManager implements BasicEntityManagerInterface

Class SasManager is injected as sas.plugin.manager service. SasManager handles the logic for managed entity.

Properties

protected SasRepository $repository
protected SendMail $mailer
protected SasEventContainer $container

Methods

__construct(SasRepository $repository, MailerInterface $mailer, SasEventContainer $container)

SasManager constructor.

Sas|null|int
save(Sas $entity, string $locale)

Check for all preconditions, persist new sas and notify user about new instance

bool|null
activateByToken(string $token)

Activate sas instance by token

bool|Sas
findByTokenForNewInstance(string $token)

Find active sas instance by token

array
findByFields(array $fields)

Find sas instance for provided array of filter values

bool|mixed|null
createNewInstance(string $token, string $password)

Do logic for creating new sas instance

Details

at line 47
__construct(SasRepository $repository, MailerInterface $mailer, SasEventContainer $container)

SasManager constructor.

Parameters

SasRepository $repository
MailerInterface $mailer
SasEventContainer $container

at line 63
Sas|null|int save(Sas $entity, string $locale)

Check for all preconditions, persist new sas and notify user about new instance

Parameters

Sas $entity
string $locale

Return Value

Sas|null|int

Exceptions

NonUniqueResultException

at line 100
bool|null activateByToken(string $token)

Activate sas instance by token

Parameters

string $token

Return Value

bool|null

at line 121
bool|Sas findByTokenForNewInstance(string $token)

Find active sas instance by token

Parameters

string $token

Return Value

bool|Sas

at line 132
array findByFields(array $fields)

Find sas instance for provided array of filter values

Parameters

array $fields

Return Value

array

at line 145
bool|mixed|null createNewInstance(string $token, string $password)

Do logic for creating new sas instance

Parameters

string $token
string $password

Return Value

bool|mixed|null