Documentation

PollComment
in package
implements ResourceInterface uses IdentifiableTrait

Poll comment.

Tags
psalm-type

PollCommentGdprArrayType = array{ id: int, createdOn: string, author: string, content: string, }

Attributes
#[Entity]

Table of Contents

Interfaces

ResourceInterface

Properties

$author  : string
Author of the comment.
$content  : string
Comment content.
$createdOn  : DateTime
Comment date.
$id  : int|null
The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
$poll  : Poll
Referenced poll.
$user  : Member
User that posted the comment.

Methods

getAuthor()  : string
Get the author.
getContent()  : string
Get the content.
getCreatedOn()  : DateTime
Get the creation date.
getId()  : int|null
Get the identifier of the object.
getPoll()  : Poll
Get the poll.
getResourceId()  : string
Get the resource ID.
getUser()  : Member
Get the user.
setAuthor()  : void
Set the author.
setContent()  : void
Set the content.
setCreatedOn()  : void
Set the creation date.
setId()  : void
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
setPoll()  : void
Set the poll.
setUser()  : void
Set the user.
toGdprArray()  : PollCommentGdprArrayType

Properties

$author

Author of the comment.

protected string $author
Attributes
#[Column]
$type: 'string'

$content

Comment content.

protected string $content
Attributes
#[Column]
$type: 'text'

$createdOn

Comment date.

protected DateTime $createdOn
Attributes
#[Column]
$type: 'datetime'

$id

The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.

protected int|null $id = null
Attributes
#[Column]
$type: 'integer'
#[GeneratedValue]
$strategy: 'IDENTITY'
#[Id]

$poll

Referenced poll.

protected Poll $poll
Attributes
#[JoinColumn]
$name: 'poll_id'
$referencedColumnName: 'id'
$nullable: false
#[ManyToOne]
$targetEntity: \Frontpage\Model\Poll::class
$inversedBy: 'comments'

$user

User that posted the comment.

protected Member $user
Attributes
#[JoinColumn]
$name: 'user_lidnr'
$referencedColumnName: 'lidnr'
$nullable: false
#[ManyToOne]
$targetEntity: \Decision\Model\Member::class

Methods

getAuthor()

Get the author.

public getAuthor() : string
Return values
string

getContent()

Get the content.

public getContent() : string
Return values
string

getCreatedOn()

Get the creation date.

public getCreatedOn() : DateTime
Return values
DateTime

getId()

Get the identifier of the object.

public getId() : int|null
Tags
psalm-ignore-nullable-return
Return values
int|null

getResourceId()

Get the resource ID.

public getResourceId() : string
Return values
string

setAuthor()

Set the author.

public setAuthor(string $author) : void
Parameters
$author : string

setContent()

Set the content.

public setContent(string $content) : void
Parameters
$content : string

setCreatedOn()

Set the creation date.

public setCreatedOn(DateTime $createdOn) : void
Parameters
$createdOn : DateTime

setId()

Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!

public setId(int|null $id) : void
Parameters
$id : int|null

toGdprArray()

public toGdprArray() : PollCommentGdprArrayType
Return values
PollCommentGdprArrayType

        
On this page

Search results