NZTA\SDLT\Tasks\SetupSDLTDataTask
SetupSDLTDataTask
Synopsis
class SetupSDLTDataTask
extends BuildTask
{
- // members
- private static string $segment = 'SetupSDLTDataTask';
- public string $title = 'Initial setup of SDLT data';
- public string $description = 'This creates the initial dashboard, pillars, questionaires, tasks, questions, inputs, actions, risks, risk rating, security components and controls, and thresholds from CSV files';
- private static array $paths = ;
- private static array $relation_paths = ;
- private array $records = ;
- private array $json_questionnaire_paths = ;
- private array $json_task_paths = ;
- // methods
- public void run()
- private DataObject joinSecurityComponent_SecurityControls()
- private DataObject joinAnswerActionField_Tasks()
- private DataObject joinAnswerInputBlock_Risks()
- private DataObject joinAnswerActionField_Risks()
- private DataObject joinDashboard_Tasks()
- private DataObject joinQuestionnaire_Tasks()
- private DataObject joinTask_DefaultSecurityComponents()
- private DataObject processDashboard()
- private DataObject processPillar()
- private DataObject processQuestionnaire()
- private DataObject processTask()
- private DataObject processQuestion()
- private DataObject processAnswerInputBlock()
- private DataObject processAnswerInputField()
- private DataObject processAnswerActionField()
- private DataObject processControlWeightSet()
- private DataObject processRisk()
- private DataObject processLikelihoodThreshold()
- private DataObject processImpactThreshold()
- private DataObject processRiskRating()
- private DataObject processSecurityComponent()
- private DataObject processSecurityControl()
- private DataObject findOrMake()
- // Inherited methods from SDLTAdminCommon
- public array getExportFields()
- public Form|false ImportJsonForm()
- public bool|HTTPResponse importJson()
- public string; getSchemaJson()
- public void LoadJson()
- public string; getImportClass()
Hierarchy
Members
private
- $json_questionnaire_paths — array
- $json_task_paths — array
- $paths
—
array
Paths to the default data, relative to BASE_PATH This is distributed with the project but can be overridden in YML Note: the order is important! - $records
—
array
This is a bucket that tracks the progress of the upload, ostensibly to avoid duplicates. - $relation_paths
—
array
Paths to the default relationship data, relative to BASE_PATH This is distributed with the project but can be overridden in YML - $segment
—
string
Segment of this task
public
- $description
—
string
Description of this task - $title
—
string
Title of this task
Methods
private
- findOrMake() — Find or make an existing DataObject
- joinAnswerActionField_Risks() — Magic method for linking AnswerActionField and Risk records
- joinAnswerActionField_Tasks() — Magic method for linking AnswerActionField and Task records
- joinAnswerInputBlock_Risks() — Magic method for linking AnswerInputBlock and Risk records
- joinDashboard_Tasks() — Magic method for linking Dashboard and Task records
- joinQuestionnaire_Tasks() — Magic method for linking Questionnaire and Task records
- joinSecurityComponent_SecurityControls() — Magic method for linking SecurityComponent and SecurityControl records
- joinTask_DefaultSecurityComponents() — Magic method for linking Task and (default) SecurityComponent records
- processAnswerActionField() — Magic method for processing the AnswerAction record
- processAnswerInputBlock() — Magic method for processing the AnswerInputBlock record (modeled by the MultiChoiceAnswerSelection DataObject)
- processAnswerInputField() — Magic method for processing the AnswerInput record
- processControlWeightSet() — Magic method for processing the ControlWeightSet record
- processDashboard() — Magic method for processing the Dashboard record
- processImpactThreshold() — Magic method for processing the ImpactThreshold record
- processLikelihoodThreshold() — Magic method for processing the LikelihoodThreshold record
- processPillar() — Magic method for processing the Pillar record
- processQuestion() — Magic method for processing the Question record
- processQuestionnaire() — Magic method for processing the Questionnaire record
- processRisk() — Magic method for processing the Risk record
- processRiskRating() — Magic method for processing the RiskRating record
- processSecurityComponent() — Magic method for processing the SecurityComponent record
- processSecurityControl() — Magic method for processing the SecurityControl record
- processTask() — Magic method for processing the Task record
public
- run() — Default "run" method, required when implementing BuildTask
Inherited from NZTA\SDLT\Traits\SDLTAdminCommon
public
- ImportJsonForm() — Generate a CSV import form for a single {@link DataObject} subclass.
- LoadJson() — LoadJson : create record from json
- getExportFields() — Allow individual data-models to declare independent config for export fields without polluting what appears in a GridField via $summary_fields.
- getImportClass() — get current class name
- getSchemaJson() — get the json schema content for the curret model
- importJson() — Imports the submitted json file based on specifications given in {@link self::model_importers}.