PollComment
in package
implements
ResourceInterface
uses
IdentifiableTrait
Poll comment.
Tags
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
stringgetContent()
Get the content.
public
getContent() : string
Return values
stringgetCreatedOn()
Get the creation date.
public
getCreatedOn() : DateTime
Return values
DateTimegetId()
Get the identifier of the object.
public
getId() : int|null
Tags
Return values
int|nullgetPoll()
Get the poll.
public
getPoll() : Poll
Return values
PollgetResourceId()
Get the resource ID.
public
getResourceId() : string
Return values
stringgetUser()
Get the user.
public
getUser() : Member
Return values
MembersetAuthor()
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
setPoll()
Set the poll.
public
setPoll(Poll $poll) : void
Parameters
- $poll : Poll
setUser()
Set the user.
public
setUser(Member $user) : void
Parameters
- $user : Member
toGdprArray()
public
toGdprArray() : PollCommentGdprArrayType