NZTA\SDLT\Model\Question
Class Question
Synopsis
class Question
extends DataObject
implements
ScaffoldingProvider
{
- // members
- private static string $table_name = 'Question';
- private static array $db = ;
- private static array $extensions = ;
- private static array $has_many = ;
- private static array $has_one = ;
- private static array $snapshot_relation_tracking = ;
- private static array $summary_fields = ;
- private static array $field_labels = ;
- private static string $default_sort = 'SortOrder';
- // methods
- public FieldList getCMSFields()
- public void onBeforeWrite()
- public SchemaScaffolder provideGraphQLScaffolding()
- public array getAnswerInputFieldsData()
- public array getAnswerActionFieldsData()
- public string ShowActionResult()
- public string getLink()
- public static void create_task_submissions_according_to_answers()
- public static DataObject create_record_from_json()
- public static array export_record()
- // Inherited methods from SDLTModelPermissions
- public bool canView()
- public bool canCreate()
- public bool canEdit()
- public bool canDelete()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Uses
Implements
- SilverStripe\GraphQL\Scaffolding\Interfaces\ScaffoldingProvider
Members
private
- $db — array
- $default_sort — string
- $extensions — array
- $field_labels — array
- $has_many
—
array
A question's answer can have fields type either inputs or actions, but not both - $has_one — array
- $snapshot_relation_tracking — array
- $summary_fields — array
- $table_name — string
Methods
public
- ShowActionResult() — Show all potential AnswerAction.Result values in the summary field
- create_record_from_json() — create question from json import
- create_task_submissions_according_to_answers() — create_task_submissions_according_to_answers
- export_record() — export question
- getAnswerActionFieldsData() — get details for Answer Action Fields
- getAnswerInputFieldsData() — get details for Answer Input Fields
- getCMSFields()
- getLink() — get current object link in model admin
- onBeforeWrite() — Deal with pre-write processes.
- provideGraphQLScaffolding()
Inherited from NZTA\SDLT\Traits\SDLTModelPermissions
public
- canCreate() — Allow logged-in user to create an instance of the model
- canDelete() — Allow logged-in user to delete an instance of the model
- canEdit() — Allow logged-in user to edit an instance of the model
- canView() — Allow logged-in user to access the model