toModel method

  1. @override
Model toModel()
override

Implementation

@override
Model toModel() {
  return Model(
    name: description().title,
    icon: 'key',
    fields: [
      [
        fieldToModelName,
        fieldToModelId,
        fieldToModelSort,
      ],
      [
        fieldToModelShowInList,
        fieldToModelIsRequired,
        BoolField(id: 'singleObject', name: 'Store one object only?'),
      ],
      [
        fieldToModelContentColor,
        fieldToModelContentIcon,
      ],
      [
        StructureField(id: fieldStructureProperty, name: 'Content structure'),
      ],
    ],
  );
}