\PollChoice
This represents a choice that belongs to a {@link Poll}
Synopsis
class PollChoice
extends DataObject
{
- // members
- public static array $db = ;
- public static array $has_one = ;
- public static array $searchable_fields = ;
- public static array $summary_fields = ;
- public static string $default_sort = '"Order" ASC, "Created" ASC';
- // methods
- public void getCMSFields()
- public void addVote()
- public void canCreate()
- public void canEdit()
- public void canDelete()
- public void getPercentageOfMax()
- public void getPercentageOfTotal()
Hierarchy
Extends
- DataObject
Members
public
- $db
- $default_sort
- $has_one
- $searchable_fields
- $summary_fields
Methods
public
- addVote() — Increase vote by one and mark its poll has voted
- canCreate()
- canDelete()
- canEdit()
- getCMSFields()
- getPercentageOfMax() — Return the relative fractional size in comparison with the maximum (winning) result.
- getPercentageOfTotal() — Return the absolute fractional amount for displaying the results.