|
Bearsampp 2026.3.26
API documentation
|
Public Member Functions | |
| __construct ($args) | |
| processWindow ($window, $id, $ctrl, $param1, $param2) | |
Data Fields | |
| const | GAUGE_DELETE = 2 |
| const | GAUGE_SAVE = 2 |
Protected Member Functions | |
| createButtons ($bearsamppWinbinder) | |
| createFormFields ($bearsamppWinbinder) | |
| deleteItem () | |
| getDeleteConfirmMessage () | |
| getDeleteDialogTitle () | |
| getDeleteErrorMessage () | |
| getDeleteSuccessMessage () | |
| getDialogTitle () | |
| getFormValues ($bearsamppWinbinder) | |
| getGaugeDelete () | |
| getGaugeSave () | |
| getSaveErrorMessage () | |
| getSaveSuccessMessage ($values) | |
| getWindowTitle () | |
| handleCustomEvent ($window, $id, $ctrl, $param1, $param2) | |
| handleDelete ($window) | |
| handleSave ($window) | |
| initializeDialog ($args) | |
| isEditMode () | |
| itemExists ($values) | |
| restartService () | |
| saveItem ($values) | |
| validateInput ($values) | |
Protected Attributes | |
| $initValue | |
| $wbBtnCancel | |
| $wbBtnDelete | |
| $wbBtnSave | |
| $wbProgressBar | |
| $wbWindow | |
Class ActionDialogBase
Base class for dialog-based actions (Add/Edit Alias/Vhost). This class provides common functionality for creating and managing dialog windows with form fields, validation, and save/delete operations.
Definition at line 17 of file class.action.dialogBase.php.
| __construct | ( | $args | ) |
Constructor for dialog actions
| array | $args | Command line arguments |
Definition at line 189 of file class.action.dialogBase.php.
References createButtons(), createFormFields(), getWindowTitle(), and initializeDialog().
|
protected |
Create standard buttons (Save, Delete, Cancel)
| object | $bearsamppWinbinder | The WinBinder instance |
Definition at line 225 of file class.action.dialogBase.php.
References $bearsamppLang, Lang\BUTTON_CANCEL, Lang\BUTTON_DELETE, Lang\BUTTON_SAVE, getGaugeSave(), and isEditMode().
Referenced by __construct().
|
abstractprotected |
Create form fields specific to the dialog This method should create all input fields, labels, and buttons
| object | $bearsamppWinbinder | The WinBinder instance |
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by __construct().
|
abstractprotected |
Delete the item
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleDelete().
|
abstractprotected |
Get delete confirmation message
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleDelete().
|
abstractprotected |
Get the delete dialog title
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleDelete().
|
abstractprotected |
Get error message after delete failure
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleDelete().
|
abstractprotected |
Get success message after delete
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleDelete().
|
abstractprotected |
Get the dialog title for messages
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleSave().
|
abstractprotected |
Get the current form values
| object | $bearsamppWinbinder | The WinBinder instance |
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleSave().
|
protected |
Get the gauge value for delete operation (can be overridden)
Definition at line 52 of file class.action.dialogBase.php.
Referenced by handleDelete().
|
protected |
Get the gauge value for save operation (can be overridden)
Reimplemented in ActionEditVhost.
Definition at line 42 of file class.action.dialogBase.php.
Referenced by createButtons(), and handleSave().
|
abstractprotected |
Get error message after save failure
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleSave().
|
abstractprotected |
Get success message after save
| array | $values | The form values |
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleSave().
|
abstractprotected |
Get the dialog window title
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by __construct().
|
protected |
Handle custom events (can be overridden by child classes)
| resource | $window | The window resource |
| int | $id | The control ID |
| resource | $ctrl | The control resource |
| mixed | $param1 | Additional parameter 1 |
| mixed | $param2 | Additional parameter 2 |
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Definition at line 320 of file class.action.dialogBase.php.
Referenced by processWindow().
|
protected |
Handle delete operation
| resource | $window | The window resource |
Definition at line 388 of file class.action.dialogBase.php.
References deleteItem(), getDeleteConfirmMessage(), getDeleteDialogTitle(), getDeleteErrorMessage(), getDeleteSuccessMessage(), getGaugeDelete(), and restartService().
Referenced by processWindow().
|
protected |
Handle save operation
| resource | $window | The window resource |
Definition at line 332 of file class.action.dialogBase.php.
References getDialogTitle(), getFormValues(), getGaugeSave(), getSaveErrorMessage(), getSaveSuccessMessage(), itemExists(), restartService(), saveItem(), and validateInput().
Referenced by processWindow().
|
protected |
Initialize the dialog window
| array | $args | Command line arguments |
Reimplemented in ActionEditAlias, and ActionEditVhost.
Definition at line 178 of file class.action.dialogBase.php.
Referenced by __construct().
|
protected |
Check if this is an edit operation (has delete button)
Definition at line 160 of file class.action.dialogBase.php.
Referenced by createButtons(), and processWindow().
|
abstractprotected |
Check if the item already exists (for add/edit operations)
| array | $values | The form values |
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleSave().
| processWindow | ( | $window, | |
| $id, | |||
| $ctrl, | |||
| $param1, | |||
| $param2 ) |
Process window events
| resource | $window | The window resource |
| int | $id | The control ID |
| resource | $ctrl | The control resource |
| mixed | $param1 | Additional parameter 1 |
| mixed | $param2 | Additional parameter 2 |
Definition at line 284 of file class.action.dialogBase.php.
References WinBinder\CTRL_ID, handleCustomEvent(), handleDelete(), handleSave(), and isEditMode().
|
abstractprotected |
Restart the service after save/delete
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleDelete(), and handleSave().
|
abstractprotected |
Save the item (create or update)
| array | $values | The form values |
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleSave().
|
abstractprotected |
Validate the form input
| array | $values | The form values |
Reimplemented in ActionAddAlias, ActionAddVhost, ActionEditAlias, and ActionEditVhost.
Referenced by handleSave().
|
protected |
Definition at line 25 of file class.action.dialogBase.php.
|
protected |
Definition at line 22 of file class.action.dialogBase.php.
|
protected |
Definition at line 23 of file class.action.dialogBase.php.
|
protected |
Definition at line 21 of file class.action.dialogBase.php.
|
protected |
Definition at line 20 of file class.action.dialogBase.php.
|
protected |
Definition at line 19 of file class.action.dialogBase.php.
| const GAUGE_DELETE = 2 |
Definition at line 28 of file class.action.dialogBase.php.
| const GAUGE_SAVE = 2 |
Definition at line 27 of file class.action.dialogBase.php.