BoothStatus
in package
FinalYes
Value object representing the lifecycle status of a booth.
Table of Contents
Constants
- ARCHIVED = 'archived'
- DRAFT = 'draft'
- PUBLISHED = 'published'
- ALLOWED = [self::DRAFT, self::PUBLISHED, self::ARCHIVED]
Properties
- $value : string
Methods
- __construct() : mixed
- all() : array<string|int, string>
- Return all allowed status strings.
- fromString() : self
- isArchived() : bool
- Whether the status represents archived.
- isDraft() : bool
- Whether the status represents a draft.
- isPublished() : bool
- Whether the status represents published.
- isValid() : bool
- value() : string
- Return the raw status string.
Constants
ARCHIVED
public
mixed
ARCHIVED
= 'archived'
DRAFT
public
mixed
DRAFT
= 'draft'
PUBLISHED
public
mixed
PUBLISHED
= 'published'
ALLOWED
private
mixed
ALLOWED
= [self::DRAFT, self::PUBLISHED, self::ARCHIVED]
Properties
$value
private
string
$value
Methods
__construct()
public
__construct(string $value) : mixed
Parameters
- $value : string
-
One of BoothStatus constants
Tags
all()
Return all allowed status strings.
public
static all() : array<string|int, string>
Return values
array<string|int, string>fromString()
public
static fromString(string $status) : self
Parameters
- $status : string
Return values
selfisArchived()
Whether the status represents archived.
public
isArchived() : bool
Return values
boolisDraft()
Whether the status represents a draft.
public
isDraft() : bool
Return values
boolisPublished()
Whether the status represents published.
public
isPublished() : bool
Return values
boolisValid()
public
static isValid(string $status) : bool
Parameters
- $status : string
Return values
boolvalue()
Return the raw status string.
public
value() : string