LinkCodeGenerator
Table of Contents
Constants
- LENGTH_СODE = 15
Methods
- __construct() : mixed
- check() : bool
- createByCollabId() : self
- generate() : InvitationLink
- This method deletes the old record and inserts a new one
- getOrGenerate() : InvitationLink
- This method returns the actual record or generates a new record
Constants
LENGTH_СODE
public
mixed
LENGTH_СODE
= 15
Methods
__construct()
public
__construct(int $entityId, LinkEntityType $entityType) : mixed
Parameters
- $entityId : int
- $entityType : LinkEntityType
check()
public
check(string $code) : bool
Parameters
- $code : string
Return values
boolcreateByCollabId()
public
static createByCollabId(int $collabId) : self
Parameters
- $collabId : int
Return values
selfgenerate()
This method deletes the old record and inserts a new one
public
generate([DateTime|null $expiredDate = null ]) : InvitationLink
Parameters
- $expiredDate : DateTime|null = null
Return values
InvitationLinkgetOrGenerate()
This method returns the actual record or generates a new record
public
getOrGenerate([DateTime|null $expiredDate = null ]) : InvitationLink
Parameters
- $expiredDate : DateTime|null = null