Menu

## MotD
in package
implements CreateableInterface Uses Creator, Deletor

MotD.php : 20

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

MotD.php : 31
`private mixed $author`

##### Tags

ManyToOne

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

JoinColumn

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

#### $body

MotD.php : 35
`private mixed $body`

##### Tags

Column

  (type="text", nullable=false)

#### $creationTime

MotD.php : 37
`private mixed $creationTime`

##### Tags

Column

  (type="datetime", nullable=false)

#### $fillable

MotD.php : 42
`private static array<string|int, mixed> $fillable = ["author", "title", "body", "systemMessage"]`

#### $id

MotD.php : 26
`private mixed $id`

##### Tags

Id

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

#### $systemMessage

MotD.php : 39
`private mixed $systemMessage = false`

##### Tags

Column

  (type="boolean", nullable=false)

#### $title

MotD.php : 33
`private mixed $title`

##### Tags

Column

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

### Methods

#### __construct()

MotD.php : 52

Constructs an entity and sets default datetime to now.

`public __construct() : mixed`

##### Return values

mixed —

#### create()

Creator.php : 25

Creates and returns an entity instance and fills values.

`public static create(array<string|int, mixed> $arguments) : CreateableInterface`

##### Parameters

$arguments : array<string|int, mixed>

  The values the instance should get

##### Tags

throws
  WrongTypeException|UnexpectedArrayKeyException
throws
  AttributeMissingException

##### Return values

CreateableInterface —

The created Entity

#### delete()

Deletor.php : 17

Deletes the entity.

`public delete(EntityManagerInterface $em) : mixed`

##### Parameters

$em : EntityManagerInterface

##### Return values

mixed —

#### getApparantAuthor()

MotD.php : 84

Returns the appearent author of this message.

`public getApparantAuthor() : CharacterInterface`

##### Return values

CharacterInterface —

#### getAuthor()

MotD.php : 75

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()

MotD.php : 123

Returns the body of the message.

`public getBody() : string`

##### Return values

string —

#### getCreationTime()

MotD.php : 141

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

`public getCreationTime() : DateTime`

##### Return values

DateTime —

#### getId()

MotD.php : 62

Returns the entities ID.

`public getId() : int`

##### Return values

int —

#### getSystemMessage()

MotD.php : 159

Returns true if the motd is a system message.

`public getSystemMessage() : bool`

##### Return values

bool —

#### getTitle()

MotD.php : 105

Returns the title of the message.

`public getTitle() : string`

##### Return values

string —

#### setAuthor()

MotD.php : 96

Sets the author of this motd.

`public setAuthor(Character $author) : mixed`

##### Parameters

$author : Character

##### Return values

mixed —

#### setBody()

MotD.php : 132

Sets the body of the message.

`public setBody(string $body) : mixed`

##### Parameters

$body : string

##### Return values

mixed —

#### setCreationTime()

MotD.php : 150

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()

MotD.php : 168

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()

MotD.php : 114

Sets the title of the message.

`public setTitle(string $title) : mixed`

##### Parameters

$title : string

##### Return values

mixed —

## Search results