CodeCraft\Pathfinder\Model\Answer
An answer, presented to users to progress to the next step of a Pathfinder
Synopsis
class Answer
extends DataObject
{
- // members
- private static array $extensions = ;
- private static string $table_name = 'PathfinderAnswer';
- private static array $db = ;
- private static array $has_one = ;
- private static array $has_many = ;
- private static array $many_many = ;
- private static array $owns = ;
- private static array $summary_fields = ;
- private static string $default_sort = 'Sort';
- private static string $go_to_results_title = 'Results';
- protected DropdownField $goesToField;
- // methods
- public void onAfterDelete()
- public void populateDefaults()
- public void getCMSFields()
- public string getTitle()
- public Pathfinder|null getPathfinder()
- public Question|null getNextQuestion()
- public string getGoesToSummary()
- public DBField getAnswerSummary()
- public string getGoToResultsTitle()
- public DropdownField getGoesToField()
- public void saveNextQuestionID()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $db — array
- $default_sort — string
- $extensions — array
- $go_to_results_title — string
- $has_many — array
- $has_one — array
- $many_many — array
- $owns — array
- $summary_fields — array
- $table_name — string
protected
- $goesToField — SilverStripe\Forms\DropdownField
Methods
public
- getAnswerSummary()
- getCMSFields() — {@inheritDoc}
- getGoToResultsTitle()
- getGoesToField()
- getGoesToSummary()
- getNextQuestion() — The first Question in the NextQuestions relation
- getPathfinder()
- getTitle() — A title for the CMS to use
- onAfterDelete() — {@inheritDoc}
- populateDefaults() — {@inheritDoc}
- saveNextQuestionID() — Capture the {@see getGoesToField()}'s input and handle it