Documentation

MotD
in package
implements CreateableInterface Uses Creator, Deletor

Model for the message of the day.

Tags
Entity
Table

(name="motd")

Interfaces, Classes and Traits

CreateableInterface
Interface for createable models.

Table of Contents

$author  : mixed
$body  : mixed
$creationTime  : mixed
$fillable  : array<string|int, mixed>
$id  : mixed
$systemMessage  : mixed
$title  : mixed
__construct()  : mixed
Constructs an entity and sets default datetime to now.
create()  : CreateableInterface
Creates and returns an entity instance and fills values.
delete()  : mixed
Deletes the entity.
getApparantAuthor()  : CharacterInterface
Returns the appearent author of this message.
getAuthor()  : CharacterInterface
Returns the character who wrote this motd.
getBody()  : string
Returns the body of the message.
getCreationTime()  : DateTime
Returns the creation time. Modification of this has no effect.
getId()  : int
Returns the entities ID.
getSystemMessage()  : bool
Returns true if the motd is a system message.
getTitle()  : string
Returns the title of the message.
setAuthor()  : mixed
Sets the author of this motd.
setBody()  : mixed
Sets the body of the message.
setCreationTime()  : mixed
Sets the creation time. Needs to be set to a new datetime instance.
setSystemMessage()  : mixed
Set to true of the message should be a system message.
setTitle()  : mixed
Sets the title of the message.

Properties

$author

private mixed $author
Tags
ManyToOne

(targetEntity="Character", cascade={"persist"}, fetch="EAGER")

JoinColumn

(name="author_id", referencedColumnName="id", nullable=false)

$body

private mixed $body
Tags
Column

(type="text", nullable=false)

$creationTime

private mixed $creationTime
Tags
Column

(type="datetime", nullable=false)

$fillable

private static array<string|int, mixed> $fillable = ["author", "title", "body", "systemMessage"]

$id

private mixed $id
Tags
Id

@Column(type="uuid", unique=True)

$systemMessage

private mixed $systemMessage = false
Tags
Column

(type="boolean", nullable=false)

$title

private mixed $title
Tags
Column

(type="string", length=255, nullable=false)

Methods

__construct()

Constructs an entity and sets default datetime to now.

public __construct() : mixed
Return values
mixed

delete()

Deletes the entity.

public delete(EntityManagerInterface $em) : mixed
Parameters
$em : EntityManagerInterface
Return values
mixed

getAuthor()

Returns the character who wrote this motd.

public getAuthor() : CharacterInterface

Returns always the real author of the message, even if it is a system message. Use $this->getSystemMessage() to check if it is a system message or $this->getAppearentAuthor() to get the appearent author.

Return values
CharacterInterface

getBody()

Returns the body of the message.

public getBody() : string
Return values
string

getCreationTime()

Returns the creation time. Modification of this has no effect.

public getCreationTime() : DateTime
Return values
DateTime

getId()

Returns the entities ID.

public getId() : int
Return values
int

getSystemMessage()

Returns true if the motd is a system message.

public getSystemMessage() : bool
Return values
bool

getTitle()

Returns the title of the message.

public getTitle() : string
Return values
string

setAuthor()

Sets the author of this motd.

public setAuthor(Character $author) : mixed
Parameters
$author : Character
Return values
mixed

setBody()

Sets the body of the message.

public setBody(string $body) : mixed
Parameters
$body : string
Return values
mixed

setCreationTime()

Sets the creation time. Needs to be set to a new datetime instance.

public setCreationTime(DateTime $creationTime) : mixed
Parameters
$creationTime : DateTime
Return values
mixed

setSystemMessage()

Set to true of the message should be a system message.

public setSystemMessage([bool $isSystemMessage = true ]) : mixed
Parameters
$isSystemMessage : bool = true
Return values
mixed

setTitle()

Sets the title of the message.

public setTitle(string $title) : mixed
Parameters
$title : string
Return values
mixed

Search results