DNADesign\SilverStripeElementalDecisionTree\Extensions\ElementDecisionTreeController
Synopsis
class ElementDecisionTreeController
extends Extension
{
- // members
- private static array $allowed_actions = ;
- // methods
- public json getNextStepForAnswer()
- public Array getInitialPathway()
- public Boolean getIsAnswerSelected()
- public DecisionTreeStep getNextStepFromSelectedAnswer()
- protected string renderError()
Hierarchy
Extends
- SilverStripe\Core\Extension
Members
private
- $allowed_actions
Methods
protected
- renderError() — Template returned via ajax in case of an error occuring.
public
- getInitialPathway() — Returns an array of DecisionStepID from the URL param in order to display the same question when we reload the page
- getIsAnswerSelected() — Check if an answer should be selected by default ie. The question depending on it is displayed
- getNextStepForAnswer() — Return the HTMl for the next step to be displayed as well as the updated URL which includes the ids of the answers leading to this next step to be returned
- getNextStepFromSelectedAnswer() — Gets the next step to be displayed in regards to the selected answer.