Documentation

PollVote
in package
implements ResourceInterface

Poll response Represents a vote on a poll option.

Tags
psalm-import-type

LocalisedTextGdprArrayType from LocalisedTextModel as ImportedLocalisedTextGdprArrayType

psalm-type

PollVoteGdprArrayType = array{ poll_id: int, option: ImportedLocalisedTextGdprArrayType, }

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

getResourceId()

Get the resource ID.

public getResourceId() : string
Return values
string

toGdprArray()

public toGdprArray() : PollVoteGdprArrayType
Return values
PollVoteGdprArrayType

        
On this page

Search results