NZTA\SDLT\Model\AnswerInputField
Class AnswerInputField
Synopsis
class AnswerInputField
extends DataObject
implements
ScaffoldingProvider
{
- // constants
- const MAX_URL_LENGTH = 4096;
- // members
- private static string $table_name = 'AnswerInputField';
- private static array $db = ;
- private static array $extensions = ;
- private static string $default_sort = 'SortOrder';
- private static array $has_one = ;
- private static array $has_many = ;
- private static array $defaults = ;
- private static array $summary_fields = ;
- private static array $field_labels = ;
- // methods
- public FieldList getCMSFields()
- public SchemaScaffolder provideGraphQLScaffolding()
- public string getGQLMultiChoiceAnswer()
- public boolean isMultipleChoice()
- public boolean isMultipleChoiceSingle()
- public string getLink()
- public void onBeforeWrite()
- public bool canView()
- public array getRisks()
- public static array get_risk_for_input_fields()
- 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
Constants
Name | Value |
---|---|
MAX_URL_LENGTH | 4096 |
Members
private
- $db — array
- $default_sort — string
- $defaults — array
- $extensions — string
- $field_labels — array
- $has_many — array
- $has_one — array
- $summary_fields — array
- $table_name — string
Methods
public
- canView() — Allow logged-in user to access the model
- create_record_from_json() — create input field from json import
- export_record() — export inputField
- getCMSFields()
- getGQLMultiChoiceAnswer() — OverLoaded getter for the "MultiChoiceAnswer" field. See the following issue on GH for context for why this is needed: https://github.com/silverstripe/silverstripe-graphql/issues/234.
- getLink() — get current object link in model admin
- getRisks() — Return all the {@link Risk} objects related to an answer.
- get_risk_for_input_fields() — question has many input field and input field type can be MultiChoiceAnswer.
- isMultipleChoice()
- isMultipleChoiceSingle()
- 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