NZTA\SDLT\Model\ControlWeightSet
This record allows multiple {@link Risk} records to be related to many {@link SecurityControl} records, which results in a unique combination of {@link SecurityComponent} to {@link SecurityControl} with a "set" comprising one or more {@link Risk} + ratings and threshold data.
Traditionally you'd use a ManyManyThrough, but as of 4.3.0, it doesn't work in
a context as you might imagine a many_many_extraFields to work.
Synopsis
class ControlWeightSet
extends DataObject
{
- // members
- private static string $table_name = 'ControlWeightSet';
- private static array $db = ;
- private static array $has_one = ;
- private static array $summary_fields = ;
- private static array $searchable_fields = ;
- // methods
- public FieldList getCMSFields()
- public void onBeforeWrite()
- public ValidationResult validate()
- public static void create_record_from_json()
- public static void get_control_weight_set()
- public static string export_record()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $db — array
- $has_one — array
- $searchable_fields — array
- $summary_fields — array
- $table_name — string
Methods
public
- create_record_from_json() — create/update control weight set from json import
- export_record() — export weight
- getCMSFields()
- get_control_weight_set() — get control weights set from db by risk, control, component id
- onBeforeWrite() — Event handler called before writing to the database.
- validate()