NZTA\SDLT\Traits\SDLTAdminCommon
Synopsis
trait SDLTAdminCommon
{
- // members
- private static string $json_schema_task = '/src/ImportJsonSchema/Schema/TaskSchema.json';
- private static string $json_schema_questionnaire = '/src/ImportJsonSchema/Schema/QuestionnaireSchema.json';
- private static string $json_schema_security_component = '/src/ImportJsonSchema/Schema/SecurityComponentSchema.json';
- private static array $allowed_actions = ;
- // methods
- public array getExportFields()
- public Form|false ImportJsonForm()
- public bool|HTTPResponse importJson()
- public string; getSchemaJson()
- public void LoadJson()
- public string; getImportClass()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
Used by
Members
private
- $allowed_actions — array
- $json_schema_questionnaire
—
string
Default location of questionnaire schema, allow dev to override for alternative schema - $json_schema_security_component
—
string
Default location of security component schema, allow dev to override for alternative schema - $json_schema_task
—
string
Default location of task schema, allow dev to override for alternative schema
Methods
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}.