NZTA\SDLT\Model\AnswerActionField
Class AnswerActionField
There are different types of action, and the CMS interface will be changed dynamically based on the type
Synopsis
class AnswerActionField
extends DataObject
implements
ScaffoldingProvider
{
- // members
- private static string $table_name = 'AnswerActionField';
- private static array $db = ;
- private static array $extensions = ;
- private static array $has_one = ;
- private static array $summary_fields = ;
- private static array $many_many = ;
- private static array $many_many_extraFields = ;
- private static array $field_labels = ;
- private static string $default_sort = 'SortOrder';
- // methods
- public FieldList getCMSFields()
- public SchemaScaffolder provideGraphQLScaffolding()
- public string getActionDescription()
- public string getLink()
- public ValidationResult validate()
- public void onBeforeWrite()
- public string getTaskNames()
- public static DataObject create_record_from_json()
- public static array export_record()
- public boolean isRiskType()
- public static array get_risk_for_action_fields()
- // 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_one — array
- $many_many — array
- $many_many_extraFields — array
- $summary_fields — array
- $table_name — string
Methods
public
- create_record_from_json() — create action field from json import
- export_record() — export actionField
- getActionDescription()
- getCMSFields()
- getLink() — get current object link in model admin
- getTaskNames() — get task name
- get_risk_for_action_fields() — question has many action fields but user can select only one action and get all the risks of the selected action
- isRiskType() — Is the {@link Questionnaire} to which this record's {@link AnswerActionField} and {@link Question} relations are related, a "Risk" type?
- onBeforeWrite() — Deal with pre-write processes.
- provideGraphQLScaffolding()
- validate() — validate the Approval Group based on the IsApprovalForTaskRequired flag
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