CodeCraft\Pathfinder\Model\Store\ProgressStore
A storage model for tracking a Pathfinder's previously answered questions
Synopsis
class ProgressStore
{
- // members
- private static string $storage_name = 'PathfinderProgress';
- private static bool $validate_sequence = true;
- protected array $entries = ;
- protected Pathfinder $handler;
- // methods
- public void initAfterRequestHandler()
- public ProgressStore add()
- public array get()
- public ProgressStore set()
- public ProgressStore clear()
- public ProgressStore clearAfterPos()
- public ProgressStore addProgress()
- public Pathfinder getHandler()
- public ProgressStore setHandler()
- public void updateForm()
- public string augmentURL()
- public string getStorageName()
- public ProgressEntry|null getByPos()
- public array toArray()
- public int count()
- public ProgressEntry|null last()
- public bool canValidateSequence()
- public bool|null isInSequence()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
- SilverStripe\Core\Injector\Injectable
- SilverStripe\Core\Extensible
Members
private
- $storage_name — string
- $validate_sequence — CodeCraft\Pathfinder\Model\Store\bool
protected
- $entries — array
- $handler — CodeCraft\Pathfinder\Model\Pathfinder
Methods
public
- add() — Add an item to the current progress
- addProgress() — Add progress by question, answer and choices
- augmentURL() — Modify the redirect url used to continue to the next step in the pathfinder
- canValidateSequence() — A heuristic for whether this story can/should determine if a specific question is the next in sequence
- clear() — Clear the current progress store
- clearAfterPos()
- count()
- get() — Get the current progress
- getByPos()
- getHandler()
- getStorageName()
- initAfterRequestHandler()
- isInSequence() — Determines if a question is the next in sequence
- last()
- set() — Set the current progress
- setHandler()
- toArray()
- updateForm() — Invoked as part of {@see PathfinderRequestHandler::Form()}