-
public final class PollKt
-
-
Method Summary
Modifier and Type Method Description final static BooleancanCastVote(Poll $self)Returns true if the current user can cast another vote on this poll. final static StringgetSubtitle(Poll $self, Context context)Returns the subtitle for the poll based on the maximum number of votes allowed. final static StringdisplayedName(Poll $self, User currentUser, Boolean autoTranslationEnabled)The poll name to display: the translation into currentUser's language when autoTranslationEnabled and available, the original name otherwise. final static StringdisplayedText(Option $self, User currentUser, Boolean autoTranslationEnabled)The option text to display, following the same rules as Poll.displayedName. final static StringdisplayedText(Answer $self, User currentUser, Boolean autoTranslationEnabled)The answer text to display, following the same rules as Poll.displayedName. final static BooleanhasTranslation(Poll $self, User currentUser)Whether the poll name or any option has a translation into currentUser's language. -
-
Method Detail
-
canCastVote
final static Boolean canCastVote(Poll $self)
Returns true if the current user can cast another vote on this poll.
-
getSubtitle
final static String getSubtitle(Poll $self, Context context)
Returns the subtitle for the poll based on the maximum number of votes allowed.
-
displayedName
final static String displayedName(Poll $self, User currentUser, Boolean autoTranslationEnabled)
The poll name to display: the translation into currentUser's language when autoTranslationEnabled and available, the original name otherwise.
-
displayedText
final static String displayedText(Option $self, User currentUser, Boolean autoTranslationEnabled)
The option text to display, following the same rules as Poll.displayedName.
-
displayedText
final static String displayedText(Answer $self, User currentUser, Boolean autoTranslationEnabled)
The answer text to display, following the same rules as Poll.displayedName.
-
hasTranslation
final static Boolean hasTranslation(Poll $self, User currentUser)
Whether the poll name or any option has a translation into currentUser's language. Answers are not included, since each one is written by a different user.
-
-
-
-