BoothItemService
in package
FinalYes
Application service for managing booth items.
Table of Contents
Properties
- $boothItemIdGenerator : BoothItemIdGenerator|null
- $boothItemRepository : BoothItemRepository
- $externalRicdPort : ExternalRicdPort
Methods
- __construct() : mixed
- Initializes the service with repositories and ports.
- archiveBoothItem() : BoothItem
- Archive a booth item.
- attachRicdToBoothItem() : void
- Attach a RICD record to an existing booth item.
- createBoothItem() : BoothItem
- UC-C-02: Create a new booth item as a draft.
- getItemBoothItemId() : BoothItemId|null
- Convenience accessor for booth item id.
- hideBoothItem() : BoothItem
- Hide a booth item from public view.
- moveBoothItemToDraft() : BoothItem
- Move a booth item back to draft status.
- publishBoothItem() : BoothItem
- Publish a booth item.
- searchRicd() : array<string|int, RicdDataSnapshot>
- UC-C-01: RICD search based on domain criteria.
- updateBoothItem() : BoothItem
- UC-C-03: Update booth item content/type while respecting locks.
- requireBoothItem() : BoothItem
- Resolve a booth item or throw if not found.
Properties
$boothItemIdGenerator
private
BoothItemIdGenerator|null
$boothItemIdGenerator
$boothItemRepository
private
BoothItemRepository
$boothItemRepository
$externalRicdPort
private
ExternalRicdPort
$externalRicdPort
Methods
__construct()
Initializes the service with repositories and ports.
public
__construct(BoothItemRepository $boothItemRepository, ExternalRicdPort $externalRicdPort[, BoothItemIdGenerator|null $boothItemIdGenerator = null ]) : mixed
Parameters
- $boothItemRepository : BoothItemRepository
- $externalRicdPort : ExternalRicdPort
- $boothItemIdGenerator : BoothItemIdGenerator|null = null
archiveBoothItem()
Archive a booth item.
public
archiveBoothItem(BoothItemId $boothItemId) : BoothItem
Parameters
- $boothItemId : BoothItemId
Return values
BoothItemattachRicdToBoothItem()
Attach a RICD record to an existing booth item.
public
attachRicdToBoothItem(BoothItemId $boothItemId, string $ricdId) : void
Parameters
- $boothItemId : BoothItemId
- $ricdId : string
createBoothItem()
UC-C-02: Create a new booth item as a draft.
public
createBoothItem(string $title, string|null $description, string $type[, BoothItemDetails|null $details = null ]) : BoothItem
Parameters
- $title : string
- $description : string|null
- $type : string
- $details : BoothItemDetails|null = null
Return values
BoothItemgetItemBoothItemId()
Convenience accessor for booth item id.
public
getItemBoothItemId(BoothItem $boothItem) : BoothItemId|null
Parameters
- $boothItem : BoothItem
Return values
BoothItemId|nullhideBoothItem()
Hide a booth item from public view.
public
hideBoothItem(BoothItemId $boothItemId) : BoothItem
Parameters
- $boothItemId : BoothItemId
Return values
BoothItemmoveBoothItemToDraft()
Move a booth item back to draft status.
public
moveBoothItemToDraft(BoothItemId $boothItemId) : BoothItem
Parameters
- $boothItemId : BoothItemId
Return values
BoothItempublishBoothItem()
Publish a booth item.
public
publishBoothItem(BoothItemId $boothItemId) : BoothItem
Parameters
- $boothItemId : BoothItemId
Return values
BoothItemsearchRicd()
UC-C-01: RICD search based on domain criteria.
public
searchRicd(string|null $keyword, string|null $organization, int|null $yearFrom, int|null $yearTo) : array<string|int, RicdDataSnapshot>
Parameters
- $keyword : string|null
- $organization : string|null
- $yearFrom : int|null
- $yearTo : int|null
Return values
array<string|int, RicdDataSnapshot>updateBoothItem()
UC-C-03: Update booth item content/type while respecting locks.
public
updateBoothItem(BoothItemId $boothItemId, string $title, string|null $description[, BoothItemDetails|null $details = null ][, string|null $type = null ]) : BoothItem
Parameters
- $boothItemId : BoothItemId
- $title : string
- $description : string|null
- $details : BoothItemDetails|null = null
- $type : string|null = null
Return values
BoothItemrequireBoothItem()
Resolve a booth item or throw if not found.
private
requireBoothItem(BoothItemId $boothItemId) : BoothItem
Parameters
- $boothItemId : BoothItemId