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? - Returns the vote of the current user for the given option in case the user has voted.
-
hasCurrentUserVotedFor(
PollOption option) → bool - Returns a Boolean value indicating whether the current user has voted the given option.
-
isOptionOneOfTheWinners(
PollOption option) → bool - Whether the poll is already closed and the provided option is one of that has the most votes.
-
isOptionWinner(
PollOption option) → bool - 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 - Whether the provided option is one of that has the most votes.
-
isOptionWithMostVotes(
PollOption option) → bool - Whether the provided option is the one, and the only one with the most votes.
-
voteCountFor(
PollOption option) → int - The vote count for the given option.
-
voteRatioFor(
PollOption option) → double - The ratio of the votes for the given option in comparison with the number of total votes.