CodeCraft\Pathfinder\Control\PathfinderRequestHandler
A handler for the contiguous requests of a user proceeding through a Pathfinder
Synopsis
class PathfinderRequestHandler
extends RequestHandler
{
- // members
- private static array $allowed_actions = ;
- private static $results_model;
- protected Pathfinder $dataRecord;
- protected Controller $controller;
- protected $results;
- protected bool $complete = false;
- protected ProgressStore|null $store;
- // methods
- public void __construct()
- public void data()
- public mixed getController()
- public ProgressStore getStore()
- public Question|null getCurrentQuestion()
- public int getCurrentStepNumber()
- public Form Form()
- public HTTPResponse doSubmitQuestion()
- public HTTPResponse|void goBack()
- public PathfinderRequestHandler clearAll()
- public void clearQuestionFormState()
- public DataList getGatheredTerms()
- public DataList getResults()
- public bool isComplete()
- public void Link()
- public string getStartLink()
- public string getResetLink()
- public string|null getFirstQuestionLink()
- public bool hasPreviousQuestion()
- public Question|null getNextQuestion()
- public bool hasProgress()
- public string getProgressLink()
- public HTTPResponse index()
- public HTTPResponse start()
- public HTTPResponse reset()
- public HTTPResponse|Controller question()
- public HTTPResponse|Controller suggestions()
Hierarchy
Extends
- SilverStripe\Control\RequestHandler
Members
private
- $allowed_actions — array
- $results_model
—
string
The model with TaxonomyTerms that can be used for results
protected
- $complete — CodeCraft\Pathfinder\Control\bool
- $controller — SilverStripe\Control\Controller
- $dataRecord — CodeCraft\Pathfinder\Model\Pathfinder
- $results — mixed
- $store — CodeCraft\Pathfinder\Control\ProgressStore|null
Methods
public
- __construct() — Setup the pathfinder handler
- Form()
- Link() — {@inheritDoc}
- clearAll() — Clear all stored data
- clearQuestionFormState() — Clear the form's state, and any offer an extension point for case-specific needs
- data() — Returns the associated database record. Borrows this convention from {@see ContentController}
- doSubmitQuestion()
- getController()
- getCurrentQuestion()
- getCurrentStepNumber()
- getFirstQuestionLink()
- getGatheredTerms() — Get the terms gathered from the user's stored choices
- getNextQuestion()
- getProgressLink()
- getResetLink()
- getResults()
- getStartLink() — The URL to the first step int he pathfinder
- getStore()
- goBack()
- hasPreviousQuestion()
- hasProgress()
- index()
- isComplete()
- question()
- reset()
- start()
- suggestions()