MessageThread
in package
implements
SaveableInterface
Uses
Saveable
A Thread of messages.
Tags
Interfaces, Classes and Traits
- SaveableInterface
- Interface for createable models.
Table of Contents
- $id : mixed
- $messages : mixed
- $participants : mixed
- $readonly : mixed
- $threadKey : mixed
- __construct() : mixed
- Constructor. Sets the (unique) threadKey.
- _save() : mixed
- Static, protected save function to call from trait-overwriting methods.
- addMessage() : mixed
- getId() : int
- Returns the primary id of this message.
- getMessages() : Collection
- Returns a list of messages inside this thread.
- getParticipants() : Collection
- Get a collection of participants in this thread.
- isReadonly() : bool
- Returns true if the thread is "readonly".
- save() : mixed
- Persists the MessageThread and adds itself to the participants.
Properties
$id
private
mixed
$id
Tags
$messages
private
mixed
$messages
Tags
$participants
private
mixed
$participants
Tags
$readonly
private
mixed
$readonly
= false
Tags
$threadKey
private
mixed
$threadKey
Tags
Methods
__construct()
Constructor. Sets the (unique) threadKey.
public
__construct(string $threadKey, array<string|int, mixed> $participants[, bool $readonly = false ]) : mixed
Parameters
- $threadKey : string
- $participants : array<string|int, mixed>
- $readonly : bool = false
Return values
mixed —_save()
Static, protected save function to call from trait-overwriting methods.
public
static _save(SaveableInterface $object, EntityManagerInterface $em) : mixed
Parameters
- $object : SaveableInterface
- $em : EntityManagerInterface
Return values
mixed —addMessage()
public
addMessage(Message $message) : mixed
Parameters
- $message : Message
Tags
Return values
mixed —getId()
Returns the primary id of this message.
public
getId() : int
Return values
int —getMessages()
Returns a list of messages inside this thread.
public
getMessages() : Collection
Return values
Collection —getParticipants()
Get a collection of participants in this thread.
public
getParticipants() : Collection
Return values
Collection —isReadonly()
Returns true if the thread is "readonly".
public
isReadonly() : bool
Return values
bool —save()
Persists the MessageThread and adds itself to the participants.
public
save(EntityManagerInterface $em) : mixed
Parameters
- $em : EntityManagerInterface