SD_Hidden
extends SC_Data
in package
Hidden data type
Does not print a label and sends a hidden input.
Tags
Table of Contents
- $autoIncrement : mixed
- $create : bool
- indicates if the SimplOndata must be used in the add(capture) from
- $delete : bool
- RSL 2022 aded "e Emebded" indicates if the SimplOndata must bre printed when deliting the element
- $embeded : bool
- RSL 2022 aded "e Emebded" indicates if the SimplOndata must bre printed when its parrent element i contained within another element
- $fetch : bool
- indicates if the SimplOndata must have a value in order to allow the storage of it's dataParent SimplOnelement
- $filterCriteria : string
- search operands: > < >= <= == != ~= ^= $=
- $fixedValue : mixed
- $inputName : string
- The name of the input field for forms.
- $invalidValueMessage : mixed
- $label : ing
- Data name or label as it must be presented to human readers (in forms, html tables, etc)
- $list : bool
- indicates if the SimplOndata must be used when several items are listed on a html table or list
- $name : mixed
- $parent : SC_Element
- $printValInInput : mixed
- $renderer : SR_htmlJQuery
- $renderOverride : mixed
- $required : bool
- indicates if the SimplOndata must have a value in order to allow the storage of it's dataParent SimplOnelement
- $search : bool
- indicates if the SimplOndata must be used in the search from
- $tip : mixed
- $tipInline : mixed
- $update : bool
- indicates if the SimplOndata must be used in the update from
- $val : mixed
- Data value
- $validationRequired : mixed
- $view : bool
- indicates if the SimplOndata must be used when generating the default HTML template
- __call() : mixed
- Auto Makes the Setters and Getters
- __construct() : mixed
- Constructs a new SC_Data instance.
- __toString() : string
- Tells PHP how to render this object as a string
- clear() : mixed
- Clears the value of a property or attribute
- clearValue() : mixed
- Clears the value of the Data object.
- dataFlags() : string|void
- Sets create, update, search, list, required and fetch flags according to the letters in $flags
- doCreate() : array<string|int, mixed>|null
- Prepares data for a create operation in the data source.
- doDelete() : mixed
- Performs actions during a delete operation.
- doRead() : array<string|int, mixed>|null
- Prepares data for a read operation from the data source.
- doSearch() : array<string|int, mixed>|null
- Prepares data for a search operation on the data source.
- doUpdate() : array<string|int, mixed>|null
- Prepares data for an update operation in the data source.
- filterCriteria() : mixed
- fixValue() : mixed
- Sets and fixes the value of the Data object, preventing further changes.
- getClass() : string
- Returns the object's class
- hasAttribute() : bool
- Checks if a an object has a specific method
- hasProperty() : bool
- Checks if a an object has a specific property
- inputName() : string
- Gives the name of the field for the create or update forms (usualy an HTML form)
- inputVal() : mixed|string
- Returns the value to be used in input fields, based on the `printValInInput` flag.
- instanceId() : mixed
- Run time id of the object used to creat ids to link things in the interface like Labels and Inputs
- InterfaceId() : string
- Returns a unique Interface ID for the Data object instance.
- isValid() : bool
- Validates the given value.
- label() : string
- Returns or sets the label for the data object.
- ObjectId() : mixed
- Class and instance id
- postCreate() : mixed
- Performs actions after data is created in the data source.
- postDelete() : mixed
- Performs actions after data is deleted from the data source.
- postRead() : mixed
- Performs actions after data is read from the data source.
- postSearch() : mixed
- Performs actions after a search is executed on the data source.
- postUpdate() : mixed
- Performs actions after data is updated in the data source.
- preCreate() : mixed
- Performs actions before data is created in the data source.
- preDelete() : mixed
- Performs actions before data is deleted from the data source.
- preRead() : mixed
- Performs actions before data is read from the data source.
- preSearch() : mixed
- Performs actions before a search is executed on the data source.
- preUpdate() : mixed
- Performs actions before data is updated in the data source.
- renderer() : SR_htmlJQuery
- Gets or sets the renderer for this Data object.
- showCreate() : mixed
- Generates the input field for creating a new data entry.
- showDelete() : mixed
- Generates the output for displaying the data in a deletion context.
- showEmbeded() : mixed
- Displays the data in an embedded context.
- showEmbededStrip() : mixed
- Returns a stripped-down, embedded representation of the Data value.
- showList() : mixed
- Displays the data for a list view.
- showSearch() : mixed
- Generates the input field or display for searching based on this data.
- showUpdate() : mixed
- Generates the input field for updating an existing data entry.
- showView() : mixed
- Displays the data for a single item view.
- val() : mixed
- Gets or sets the value of the Data object.
- viewVal() : mixed
- Returns the value of the Data object for viewing.
Properties
$autoIncrement
protected
mixed
$autoIncrement
= \true
$create
indicates if the SimplOndata must be used in the add(capture) from
protected
bool
$create
= \false
- these variables are flags to indicate if this input will be displayed in the different templates.
$delete
RSL 2022 aded "e Emebded" indicates if the SimplOndata must bre printed when deliting the element
protected
bool
$delete
= \true
$embeded
RSL 2022 aded "e Emebded" indicates if the SimplOndata must bre printed when its parrent element i contained within another element
protected
bool
$embeded
= \true
$fetch
indicates if the SimplOndata must have a value in order to allow the storage of it's dataParent SimplOnelement
protected
bool
$fetch
= \true
$filterCriteria
search operands: > < >= <= == != ~= ^= $=
protected
string
$filterCriteria
= \true
Complex operations are just simple operations jointed with ANDs and ORs, so it'd be possible to create "Operators" objects that defines those complex operations.
(name > val1) OR (name < val2)
a <= x <= b a > x || x < b
$fixedValue
protected
mixed
$fixedValue
= \true
$inputName
The name of the input field for forms.
protected
string
$inputName
= \true
Tags
$invalidValueMessage
protected
mixed
$invalidValueMessage
= \true
$label
Data name or label as it must be presented to human readers (in forms, html tables, etc)
protected
ing
$label
= \true
Tags
$list
indicates if the SimplOndata must be used when several items are listed on a html table or list
protected
bool
$list
= \true
$name
protected
mixed
$name
= \true
$parent
protected
SC_Element
$parent
= \true
$printValInInput
protected
mixed
$printValInInput
= \true
$renderer
protected
SR_htmlJQuery
$renderer
= \true
$renderOverride
protected
mixed
$renderOverride
= \true
$required
indicates if the SimplOndata must have a value in order to allow the storage of it's dataParent SimplOnelement
protected
bool
$required
= \false
- these variables are flags to indicate if this input will be displayed in the different templates.
$search
indicates if the SimplOndata must be used in the search from
protected
bool
$search
= \true
$tip
protected
mixed
$tip
= \true
$tipInline
protected
mixed
$tipInline
= \true
$update
indicates if the SimplOndata must be used in the update from
protected
bool
$update
= \false
- these variables are flags to indicate if this input will be displayed in the different templates.
$val
Data value
protected
mixed
$val
= \true
Tags
$validationRequired
protected
mixed
$validationRequired
= \true
$view
indicates if the SimplOndata must be used when generating the default HTML template
protected
bool
$view
= \false
- these variables are flags to indicate if this input will be displayed in the different templates.
Methods
__call()
Auto Makes the Setters and Getters
public
__call( $name, $arguments) : mixed
Parameters
Return values
mixed —__construct()
Constructs a new SC_Data instance.
public
__construct([string|null $label = null ][, string|null $flags = null ][, mixed $val = null ][, string|null $filterCriteria = null ]) : mixed
Initializes the Data object with a label, optional flags, an initial value, and filter criteria. Sets default validation messages for required fields and invalid values using the localization function. Applies the provided flags if available.
Parameters
- $label : string|null = null
-
Human readable description of the attribute, intended to appear in forms and tables. Defaults to null.
- $flags : string|null = null
-
VCUSRLF flags indicating where the Data will be used within an Element. dataFlags. Defaults to null.
- $val : mixed = null
-
If provided, sets the initial value of the data. Defaults to null.
- $filterCriteria : string|null = null
-
Determines how the data value will be compared/evaluated in queries to the Data Storage. Defaults to null.
Return values
mixed —__toString()
Tells PHP how to render this object as a string
public
__toString() : string
Return values
string —clear()
Clears the value of a property or attribute
public
clear(string $name) : mixed
Parameters
- $name : string
Return values
mixed —clearValue()
Clears the value of the Data object.
public
clearValue() : mixed
Return values
mixed —dataFlags()
Sets create, update, search, list, required and fetch flags according to the letters in $flags
public
dataFlags([string|null $flags = null ]) : string|void
The flags are represented by a string where each character indicates a specific use case: 'v' (view), 'c' (create), 'u' (update), 's' (search), 'l' (list), 'e' (embeded), 'r' (required), 'f' (fetch). Uppercase letters set the flag to true, lowercase letters set it to false.
Parameters
- $flags : string|null = null
-
Optional. A string containing the flags to set. If null, the current flags string is returned.
Return values
string|void —Returns the current flags string if $flags is null, otherwise sets the flags and returns nothing.
doCreate()
Prepares data for a create operation in the data source.
public
doCreate() : array<string|int, mixed>|null
This method is called by the parent Element's processData('doCreate')
method.
It should return an array of data relevant for creation if the data is creatable.
Tags
Return values
array<string|int, mixed>|null —An array containing data for the create operation, or null if the data is not creatable.
doDelete()
Performs actions during a delete operation.
public
doDelete() : mixed
This method is called by the parent Element's processData('doDelete')
method.
Child classes can override this to perform specific actions during deletion.
Tags
Return values
mixed —doRead()
Prepares data for a read operation from the data source.
public
doRead() : array<string|int, mixed>|null
This method is called by the parent Element's processData('doRead')
method.
It should return an array of data relevant for reading if the data is fetchable.
Tags
Return values
array<string|int, mixed>|null —An array containing data for the read operation, or null if the data is not fetchable.
doSearch()
Prepares data for a search operation on the data source.
public
doSearch() : array<string|int, mixed>|null
This method is called by the parent Element's processData('doSearch')
method.
It should return an array of data relevant for searching if the data is searchable and fetchable.
Tags
Return values
array<string|int, mixed>|null —An array containing data for the search operation, or null if the data is not searchable or fetchable.
doUpdate()
Prepares data for an update operation in the data source.
public
doUpdate() : array<string|int, mixed>|null
This method is called by the parent Element's processData('doUpdate')
method.
It should return an array of data relevant for updating if the data is updatable.
Tags
Return values
array<string|int, mixed>|null —An array containing data for the update operation, or null if the data is not updatable.
filterCriteria()
public
filterCriteria([mixed $filterCriteria = null ]) : mixed
Parameters
- $filterCriteria : mixed = null
Return values
mixed —fixValue()
Sets and fixes the value of the Data object, preventing further changes.
public
fixValue(mixed $val) : mixed
It also sets a render override to 'showFixedValue', thats used on the form interfaces.
Parameters
- $val : mixed
-
The value to set and fix.
Return values
mixed —getClass()
Returns the object's class
public
getClass() : string
Return values
string —The short class name of the object instance.
hasAttribute()
Checks if a an object has a specific method
public
hasAttribute(mixed $attribute) : bool
Parameters
- $attribute : mixed
Return values
bool —hasProperty()
Checks if a an object has a specific property
public
hasProperty(string $propName) : bool
Parameters
- $propName : string
Return values
bool —inputName()
Gives the name of the field for the create or update forms (usualy an HTML form)
public
inputName([string|null $inputName = null ]) : string
Parameters
- $inputName : string|null = null
-
Optional. The name to set for the input field. If null, the current input name is returned or derived.
Return values
string —The name of the input field.
inputVal()
Returns the value to be used in input fields, based on the `printValInInput` flag.
public
inputVal() : mixed|string
Return values
mixed|string —The data value or an empty string.
instanceId()
Run time id of the object used to creat ids to link things in the interface like Labels and Inputs
public
instanceId() : mixed
Return values
mixed —InterfaceId()
Returns a unique Interface ID for the Data object instance.
public
InterfaceId() : string
This ID can be used for generating unique Interface element IDs in forms or other interfaces.
Return values
string —A unique Interface ID for the instance.
isValid()
Validates the given value.
public
isValid(mixed $val) : bool
This is a base implementation that always returns true. Child classes should override this method to provide specific validation logic for their data type.
Parameters
- $val : mixed
-
The value to validate.
Return values
bool —True if the value is valid, false otherwise.
label()
Returns or sets the label for the data object.
public
label([mixed $flags = null ]) : string
If setting, it updates the internal label. If getting and no label is set, it generates one from the data name and applies localization.
Parameters
- $flags : mixed = null
Return values
string —The localized label for the data object.
ObjectId()
Class and instance id
public
ObjectId() : mixed
Return values
mixed —postCreate()
Performs actions after data is created in the data source.
public
postCreate() : mixed
This method is a hook for executing custom logic after the data has been stored for a new element.
It is called by the parent Element's processData('postCreate')
method.
Tags
Return values
mixed —postDelete()
Performs actions after data is deleted from the data source.
public
postDelete() : mixed
This method is a hook for executing custom logic after the data has been removed for an element.
It is called by the parent Element's processData('postDelete')
method.
Tags
Return values
mixed —postRead()
Performs actions after data is read from the data source.
public
postRead() : mixed
This method is a hook for executing custom logic after the data has been fetched or read.
It is called by the parent Element's processData('postRead')
method.
Tags
Return values
mixed —postSearch()
Performs actions after a search is executed on the data source.
public
postSearch() : mixed
This method is a hook for executing custom logic after search criteria have been applied.
It is called by the parent Element's processData('postSearch')
method.
Tags
Return values
mixed —postUpdate()
Performs actions after data is updated in the data source.
public
postUpdate() : mixed
This method is a hook for executing custom logic after the data has been updated for an existing element.
It is called by the parent Element's processData('postUpdate')
method.
Tags
Return values
mixed —preCreate()
Performs actions before data is created in the data source.
public
preCreate() : mixed
This method is a hook for executing custom logic before the data is stored for a new element.
Return values
mixed —preDelete()
Performs actions before data is deleted from the data source.
public
preDelete() : mixed
This method is a hook for executing custom logic before the data is removed for an element.
Return values
mixed —preRead()
Performs actions before data is read from the data source.
public
preRead() : mixed
This method is a hook for executing custom logic before the data is fetched or read.
Return values
mixed —preSearch()
Performs actions before a search is executed on the data source.
public
preSearch() : mixed
This method is a hook for executing custom logic before search criteria are applied.
Return values
mixed —preUpdate()
Performs actions before data is updated in the data source.
public
preUpdate() : mixed
This method is a hook for executing custom logic before the data is updated for an existing element.
Return values
mixed —renderer()
Gets or sets the renderer for this Data object.
public
renderer([SR_htmlJQuery|null $renderer = null ]) : SR_htmlJQuery
If no renderer is set for this Data object, it attempts to get the renderer from its parent Element. If no parent or renderer is found, it defaults to the global renderer.
Parameters
- $renderer : SR_htmlJQuery|null = null
-
Optional. The renderer instance to set. If null, the current renderer is returned.
Return values
SR_htmlJQuery —The renderer instance.
showCreate()
Generates the input field for creating a new data entry.
public
showCreate() : mixed
This method provides the interface item element required for capturing the data when creating a new element. Returns the appropriate input field for creation.
Return values
mixed —The input element for creation.
showDelete()
Generates the output for displaying the data in a deletion context.
public
showDelete() : mixed
This method is used to render the data when an element is being prepared for deletion. Child classes should override this method to provide a specific representation for deletion.
Return values
mixed —The rendered output for deletion.
showEmbeded()
Displays the data in an embedded context.
public
showEmbeded() : mixed
This method is used when the data is displayed as part of another element. Returns the formatted value appropriate for embedding.
Return values
mixed —The rendered output for embedding.
showEmbededStrip()
Returns a stripped-down, embedded representation of the Data value.
public
showEmbededStrip() : mixed
By default, this returns the raw value. Child classes can override this for specific formatting.
Return values
mixed —The stripped-down embedded value.
showList()
Displays the data for a list view.
public
showList() : mixed
This method is used to render the data when multiple elements are displayed in a list or table. Returns the formatted value appropriate for a list view.
Return values
mixed —The rendered output for listing.
showSearch()
Generates the input field or display for searching based on this data.
public
showSearch() : mixed
This method is used to create the form element or display representation for searching. Returns the appropriate input field or display for searching.
Return values
mixed —The input element or display for searching.
showUpdate()
Generates the input field for updating an existing data entry.
public
showUpdate() : mixed
This method provides the interface item element required for modifying the data of an existing element. Returns the appropriate input field for updating, potentially pre-filled with the current value.
Return values
mixed —The input element for updating.
showView()
Displays the data for a single item view.
public
showView() : mixed
This method is typically used to render the data in a detailed view of an element. Returns the formatted value appropriate for a detailed view.
Return values
mixed —The rendered output for viewing.
val()
Gets or sets the value of the Data object.
public
val([mixed $val = null ]) : mixed
If a value is provided, it attempts to set it after validation, unless the value is fixed. If no value is provided, it returns the current value.
Parameters
- $val : mixed = null
-
Optional. The value to set. Defaults to null.
Tags
Return values
mixed —The current value of the Data object if no value is provided for setting.
viewVal()
Returns the value of the Data object for viewing.
public
viewVal() : mixed
This method provides the raw value suitable for simple display.
Return values
mixed —The current value of the Data object.