Definition at line 7 of file Widget.php.
◆ __construct()
__construct |
( |
|
$config = null | ) |
|
◆ _get()
◆ actionHelp()
◆ caption()
◆ check()
check |
( |
|
$value, |
|
|
|
$index = null |
|
) |
| |
Check a value.
- Parameters
-
mixed | $value | Value in standard, internal format. |
int | $index | Index for mutual children. |
- Returns
- string Error code (empty = OK).
Definition at line 281 of file Widget.php.
◆ checkMax()
checkMax |
( |
|
$value, |
|
|
|
$index = null |
|
) |
| |
|
protected |
◆ checkMin()
checkMin |
( |
|
$value, |
|
|
|
$index = null |
|
) |
| |
|
protected |
◆ checkRequired()
checkRequired |
( |
|
$value, |
|
|
|
$index = null |
|
) |
| |
|
protected |
Required check.
This check will only be called when the value is empty. If the required parameter has the value self::VALID_FUNC, then the checkValidFunc() function will be used to determine whether the value is correct (allowed empty). If the required parameter is an array, the first entry is seen as an reference to another widget (e.g. 'List__*__Name' - where the asterisk will be replaced with the current index). Its value will then be used for an comparison with an operator (2nd entry) and a value (3rd entry). If this comparison returns true, the value is required.
Definition at line 260 of file Widget.php.
◆ checkValidFunc()
checkValidFunc |
( |
|
$value, |
|
|
|
$index = null |
|
) |
| |
|
protected |
◆ clientConfig()
Public configuration.
- Returns
- array Public configuration for this widget in key => value pairs.
Definition at line 100 of file Widget.php.
◆ clientConvert()
Convert a value from client format to standard, internal format.
- Parameters
-
mixed | $value | Value in client format. |
- Returns
- mixed Value in standard, internal format.
Definition at line 148 of file Widget.php.
◆ clientFormat()
Format a value from standard, internal format to client format.
- Parameters
-
mixed | $value | Value in standard, internal format. |
- Returns
- mixed Value in client format.
Definition at line 172 of file Widget.php.
◆ config()
config |
( |
|
$key, |
|
|
|
$default = null |
|
) |
| |
|
protected |
Get single configuration value.
- Parameters
-
string | $key | Key. |
mixed | $default | Default value. |
- Returns
- mixed Value.
Definition at line 93 of file Widget.php.
◆ convert()
Convert a value from user format to standard, internal format.
- Parameters
-
mixed | $value | Value in user format. |
- Returns
- mixed Value in standard, internal format.
Definition at line 140 of file Widget.php.
◆ dataConvert()
Convert an internal value before it is stored in the request data.
- Parameters
-
mixed | $value | Value in internal format. |
- Returns
- mixed Value in request data format.
Definition at line 156 of file Widget.php.
◆ execute()
Execute an action on this widget.
Security checks are executed before. All input and output is handled through the request component. An action can only trust the values from the data array. An action must check if the widget is writeable for actions that perform 'write like' behaviour.
Definition at line 224 of file Widget.php.
◆ executeChild()
Execute an action on a child widget.
The widget must determine the child from the ID. E.g. for a list the ID could be [list,5,name] (name of the 5th record on the list). The 'name' child widget will be called then (with 5 as the index).
- Parameters
-
array | $id | Complete compound ID, including the ID of this parent. |
Definition at line 215 of file Widget.php.
◆ expect()
Note if an action is expected.
- Parameters
-
Definition at line 206 of file Widget.php.
◆ format()
Format a value from standard, internal format to user format.
- Parameters
-
mixed | $value | Value in standard, internal format. |
- Returns
- mixed Value in user format.
Definition at line 164 of file Widget.php.
◆ formatTag()
Format a tag value.
- Parameters
-
mixed | $value | Value in standard, internal format. |
- Returns
- mixed Value in user format.
Definition at line 180 of file Widget.php.
◆ getDisplay()
◆ getFred()
◆ getId()
◆ getParams()
◆ getReadable()
◆ getRight()
◆ getTags()
◆ getWidgets()
◆ getWriteable()
◆ hint()
◆ init()
◆ nothing()
Check if a value is empty.
- Parameters
-
- Returns
- bool True when empty.
Definition at line 240 of file Widget.php.
◆ purge()
Purge a value.
- Parameters
-
- Returns
- string Purged value.
Definition at line 196 of file Widget.php.
◆ purgeBase()
Purge function that will be called first.
- Parameters
-
- Returns
- string Purged value.
Definition at line 188 of file Widget.php.
◆ setController()
◆ update()
Update the widget configuration.
- Parameters
-
array | $config | New configuration (key-value pairs). Old values, which are not in the new configuration, are preserved. |
Definition at line 83 of file Widget.php.
◆ $_config
◆ $_controller
◆ $_display
◆ $_id
◆ $_params
◆ $_right
◆ $_securityChecksIgnore
$_securityChecksIgnore = [] |
|
protected |
◆ $_tags
◆ $_widgets
Optional child widgets.
Definition at line 56 of file Widget.php.
◆ $defaultValue
◆ $help
◆ $max
◆ $min
◆ $parent
Optional parent widget.
Definition at line 52 of file Widget.php.
◆ $required
◆ $trailer
◆ $validFunc
◆ $widgetHelp
◆ CAPTION
◆ CHILD_ID_SEPARATOR
const CHILD_ID_SEPARATOR = '__' |
◆ CLASS_NAME
const CLASS_NAME = 'className' |
◆ DEFAULT_VALUE
const DEFAULT_VALUE = 'defaultValue' |
◆ DISPLAY
const DISPLAY = 'display' |
Display type (see DISPLAY_* constants).
Definition at line 14 of file Widget.php.
◆ DISPLAY_HIDDEN
const DISPLAY_HIDDEN = 'h' |
Do not show (only hidden)
Definition at line 36 of file Widget.php.
◆ DISPLAY_MINIMAL
const DISPLAY_MINIMAL = 'm' |
Show only value (without input element(s)).
Definition at line 37 of file Widget.php.
◆ DISPLAY_READABLE
const DISPLAY_READABLE = 'r' |
Show input element(s), but read-only.
Definition at line 38 of file Widget.php.
◆ DISPLAY_WRITEABLE
const DISPLAY_WRITEABLE = 'w' |
Show editable input element(s).
Definition at line 39 of file Widget.php.
◆ EVENT_ACTION_PREFIX
const EVENT_ACTION_PREFIX = 'controller:widget:action:' |
◆ HELP
Help string (translated).
Definition at line 15 of file Widget.php.
◆ HINT
◆ MAX
◆ MIN
◆ PARAMS
Extra parameters (prefix the key with a '@' to point to the value of another widget).
Definition at line 17 of file Widget.php.
◆ REQUIRED
const REQUIRED = 'required' |
True for required. Set to self::VALID_FUNC to let the validation function handle this. Use.
Definition at line 28 of file Widget.php.
◆ RIGHT
Optional different right with respect to the controller. If the user has the right, then (s)he.
Definition at line 18 of file Widget.php.
◆ SECURITY_CHECKS_IGNORE
const SECURITY_CHECKS_IGNORE = 'securityChecksIgnore' |
Security checks to ignore (array with checks to ignore, true =.
Definition at line 32 of file Widget.php.
◆ TAGS
Extra tags for help, hint, and trailer.
Definition at line 21 of file Widget.php.
◆ TRAILER
const TRAILER = 'trailer' |
Trailer string (translated).
Definition at line 20 of file Widget.php.
◆ VALID_FUNC
const VALID_FUNC = 'validFunc' |
Specific validation function (called with value and index; returns true if OK).
Definition at line 30 of file Widget.php.
◆ WIDGET_HELP
const WIDGET_HELP = 'widgetHelp' |
General widget help (translated).
Definition at line 22 of file Widget.php.
◆ WIDGETS
const WIDGETS = 'widgets' |
Optional child widgets (key = name, value = widget object).
Definition at line 31 of file Widget.php.
The documentation for this class was generated from the following file:
- /var/www/fred.local/vendor/rsi/fred/src/Rsi/Fred/Controller/Widget.php