PollX extension

Helper extension for Poll model.

on

Properties

currentMaximumVoteCount int

Available on Poll, provided by the PollX extension

The value of the option with the most votes.
no setter

Methods

currentUserVoteFor(PollOption option) PollVote?

Available on Poll, provided by the PollX extension

Returns the vote of the current user for the given option in case the user has voted.
hasCurrentUserVotedFor(PollOption option) bool

Available on Poll, provided by the PollX extension

Returns a Boolean value indicating whether the current user has voted the given option.
isOptionOneOfTheWinners(PollOption option) bool

Available on Poll, provided by the PollX extension

Whether the poll is already closed and the provided option is one of that has the most votes.
isOptionWinner(PollOption option) bool

Available on Poll, provided by the PollX extension

Whether the poll is already closed and the provided option is the one, and the only one with the most votes.
isOptionWithMaximumVotes(PollOption option) bool

Available on Poll, provided by the PollX extension

Whether the provided option is one of that has the most votes.
isOptionWithMostVotes(PollOption option) bool

Available on Poll, provided by the PollX extension

Whether the provided option is the one, and the only one with the most votes.
voteCountFor(PollOption option) int

Available on Poll, provided by the PollX extension

The vote count for the given option.
voteRatioFor(PollOption option) double

Available on Poll, provided by the PollX extension

The ratio of the votes for the given option in comparison with the number of total votes.