From 2795d752014e048ea5020b78775e69eb568bf9b1 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Sun, 17 Mar 2024 19:02:18 +0100 Subject: [PATCH] development/frontend/models - add volatile option. closes https://github.com/opnsense/docs/issues/542 --- source/development/frontend/models_design.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/development/frontend/models_design.rst b/source/development/frontend/models_design.rst index befeef40..801ea41c 100644 --- a/source/development/frontend/models_design.rst +++ b/source/development/frontend/models_design.rst @@ -2,6 +2,8 @@ Designing the model ------------------- +.. contents:: Index + Creating models for OPNsense is divided into two separate blocks: #. A PHP class describing the actions on our data (also acts as a @@ -116,6 +118,22 @@ their own namespace at *OPNsense\\Base\\FieldTypes* deriving from *BaseField*. exists) +volatile fields +......................................... + +In some cases it can be practical to define fields which act as standard fields, but will not be persisted +in the configuration. Examples of this are fields used to generate other type of content, such as a certificate +or fields that reflect data stored elsewhere. + +To make a field volatile, just add the tag :code:`volatile="true"` in the xml clause, for example: + +:: + + + + + +------------------------------------ Special model types ------------------------------------