BoothItem
in package
Aggregate root for a booth item (poster/startup/challenge/RICD-backed entry).
Table of Contents
Properties
- $description : string|null
- $details : BoothItemDetails|null
- Type-specific details, e.g. RicdDetails, StartupDetails.
- $id : BoothItemId
- $isLocked : bool
- Guard flag preventing further edits.
- $ricdQuery : RicdQuery
- $ricdRefreshedAt : DateTimeImmutable|null
- $ricdSelectedAt : DateTimeImmutable|null
- $ricdSelectedData : RicdDataSnapshot|null
- Selected RICD data with timestamps (FZ 1.2).
- $ricdSnapshot : RicdDataSnapshot|null
- Snapshot of the last selected/saved RICD data (nullable).
- $status : string
- BoothItemStatus::* (string)
- $title : string
- $type : string
- BoothItemType::* (string)
Methods
- __construct() : mixed
- Booth item constructor.
- archive() : self
- Irreversibly archive an item and lock further edits.
- assertCanBeEdited() : void
- Guard to protect locked booth items from changes.
- description() : string|null
- Long description.
- details() : BoothItemDetails|null
- Type-specific details (optional).
- hide() : self
- Hide the item without archiving.
- id() : BoothItemId
- Booth item identifier.
- isArchived() : bool
- Whether the item is archived.
- isLocked() : bool
- Whether the item is locked against changes.
- linkToRicdSnapshot() : self
- Link an existing record to a RICD snapshot.
- moveToDraft() : self
- Move back to draft for further editing.
- publish() : self
- Publish the booth item (visible on frontend).
- ricdDataSnapshot() : RicdDataSnapshot|null
- RICD data snapshot linked to this item.
- ricdQuery() : RicdQuery
- RICD query used to retrieve data.
- ricdRefreshedAt() : DateTimeImmutable|null
- When the RICD record was last refreshed.
- ricdSelectedAt() : DateTimeImmutable|null
- When the RICD record was selected.
- ricdSelectedData() : RicdDataSnapshot|null
- Selected RICD data (with timestamps).
- status() : string
- Current status (BoothItemStatus::*).
- title() : string
- Title of the booth item.
- type() : string
- Booth item type (BoothItemType::*).
- withContent() : self
- Update content fields and optionally change type/details.
- withRicdData() : self
- Attach RICD data and optional details.
- changeStatus() : self
- Change lifecycle status with invariant checks.
Properties
$description
private
string|null
$description
$details
Type-specific details, e.g. RicdDetails, StartupDetails.
private
BoothItemDetails|null
$details
$id
private
BoothItemId
$id
$isLocked
Guard flag preventing further edits.
private
bool
$isLocked
$ricdQuery
private
RicdQuery
$ricdQuery
$ricdRefreshedAt
private
DateTimeImmutable|null
$ricdRefreshedAt
$ricdSelectedAt
private
DateTimeImmutable|null
$ricdSelectedAt
$ricdSelectedData
Selected RICD data with timestamps (FZ 1.2).
private
RicdDataSnapshot|null
$ricdSelectedData
$ricdSnapshot
Snapshot of the last selected/saved RICD data (nullable).
private
RicdDataSnapshot|null
$ricdSnapshot
$status
BoothItemStatus::* (string)
private
string
$status
$title
private
string
$title
$type
BoothItemType::* (string)
private
string
$type
Methods
__construct()
Booth item constructor.
public
__construct(BoothItemId $id, string $title, string|null $description, string $type, string $status, RicdQuery $ricdQuery[, RicdDataSnapshot|null $ricdSnapshot = null ][, BoothItemDetails|null $details = null ][, bool $isLocked = false ]) : mixed
Parameters
- $id : BoothItemId
- $title : string
- $description : string|null
- $type : string
-
BoothItemType::*
- $status : string
-
BoothItemStatus::*
- $ricdQuery : RicdQuery
- $ricdSnapshot : RicdDataSnapshot|null = null
- $details : BoothItemDetails|null = null
- $isLocked : bool = false
archive()
Irreversibly archive an item and lock further edits.
public
archive() : self
Return values
selfassertCanBeEdited()
Guard to protect locked booth items from changes.
public
assertCanBeEdited() : void
description()
Long description.
public
description() : string|null
Return values
string|nulldetails()
Type-specific details (optional).
public
details() : BoothItemDetails|null
Return values
BoothItemDetails|nullhide()
Hide the item without archiving.
public
hide() : self
Return values
selfid()
Booth item identifier.
public
id() : BoothItemId
Return values
BoothItemIdisArchived()
Whether the item is archived.
public
isArchived() : bool
Return values
boolisLocked()
Whether the item is locked against changes.
public
isLocked() : bool
Return values
boollinkToRicdSnapshot()
Link an existing record to a RICD snapshot.
public
linkToRicdSnapshot(RicdDataSnapshot $snapshot) : self
Parameters
- $snapshot : RicdDataSnapshot
Return values
selfmoveToDraft()
Move back to draft for further editing.
public
moveToDraft() : self
Return values
selfpublish()
Publish the booth item (visible on frontend).
public
publish() : self
Return values
selfricdDataSnapshot()
RICD data snapshot linked to this item.
public
ricdDataSnapshot() : RicdDataSnapshot|null
Return values
RicdDataSnapshot|nullricdQuery()
RICD query used to retrieve data.
public
ricdQuery() : RicdQuery
Return values
RicdQueryricdRefreshedAt()
When the RICD record was last refreshed.
public
ricdRefreshedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullricdSelectedAt()
When the RICD record was selected.
public
ricdSelectedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullricdSelectedData()
Selected RICD data (with timestamps).
public
ricdSelectedData() : RicdDataSnapshot|null
Return values
RicdDataSnapshot|nullstatus()
Current status (BoothItemStatus::*).
public
status() : string
Return values
stringtitle()
Title of the booth item.
public
title() : string
Return values
stringtype()
Booth item type (BoothItemType::*).
public
type() : string
Return values
stringwithContent()
Update content fields and optionally change type/details.
public
withContent(string $title, string|null $description[, BoothItemDetails|null $details = null ][, string|null $type = null ]) : self
Parameters
- $title : string
- $description : string|null
- $details : BoothItemDetails|null = null
- $type : string|null = null
Return values
selfwithRicdData()
Attach RICD data and optional details.
public
withRicdData(RicdQuery $query, RicdDataSnapshot $snapshot[, BoothItemDetails|null $details = null ]) : self
Parameters
- $query : RicdQuery
- $snapshot : RicdDataSnapshot
- $details : BoothItemDetails|null = null
Return values
selfchangeStatus()
Change lifecycle status with invariant checks.
private
changeStatus(string $newStatus) : self
Parameters
- $newStatus : string