PollVote
in package
implements
ResourceInterface
Poll response Represents a vote on a poll option.
Tags
Attributes
- #[Entity]
- #[UniqueConstraint]
- $name: 'vote_idx'
- $columns: ['poll_id', 'user_id']
Table of Contents
Interfaces
- ResourceInterface
Properties
- $poll : Poll
- The poll which was voted on.
- $pollOption : PollOption
- The option which was chosen.
- $respondent : Member
- The user whom submitted this vote.
Methods
- getPoll() : Poll
- getPollOption() : PollOption
- getResourceId() : string
- Get the resource ID.
- setPoll() : void
- setPollOption() : void
- setRespondent() : void
- toGdprArray() : PollVoteGdprArrayType
Properties
$poll
The poll which was voted on.
protected
Poll
$poll
Attributes
- #[JoinColumn]
- $name: 'poll_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[ManyToOne]
- $targetEntity: \Frontpage\Model\Poll::class
$pollOption
The option which was chosen.
protected
PollOption
$pollOption
Attributes
- #[Id]
- #[JoinColumn]
- $name: 'option_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[ManyToOne]
- $targetEntity: \Frontpage\Model\PollOption::class
- $inversedBy: 'votes'
$respondent
The user whom submitted this vote.
protected
Member
$respondent
Attributes
- #[Id]
- #[JoinColumn]
- $name: 'user_id'
- $referencedColumnName: 'lidnr'
- $nullable: false
- #[ManyToOne]
- $targetEntity: \Decision\Model\Member::class
- $cascade: ['persist']
Methods
getPoll()
public
getPoll() : Poll
Return values
PollgetPollOption()
public
getPollOption() : PollOption
Return values
PollOptiongetResourceId()
Get the resource ID.
public
getResourceId() : string
Return values
stringsetPoll()
public
setPoll(Poll $poll) : void
Parameters
- $poll : Poll
setPollOption()
public
setPollOption(PollOption $pollOption) : void
Parameters
- $pollOption : PollOption
setRespondent()
public
setRespondent(Member $respondent) : void
Parameters
- $respondent : Member
toGdprArray()
public
toGdprArray() : PollVoteGdprArrayType