\SwitchGroups
Allows to put some switches into groups
Synopsis
class SwitchGroups
{
- // constants
- const URL_ME = '?module=switchgroups';
- // members
- protected $messages = NULL;
- protected bool $sortByModelName = false;
- // methods
- public void __construct()
- protected void initMessages()
- public getUbMsgHelperInstance()
- public array getSwitchGroupsData()
- public int getSwitchGroupIdByName()
- public int getSwitchGroupNameById()
- public array getSwitchesIdsWithGroupsData()
- public array|string|int getSwitchGroupBySwitchId()
- public int countSwitchesInGroup()
- public array getSwithcesInGroup()
- public string renderSwitchesInGroupTable()
- public void renderSwitchGroupsSelector()
- public void renderJSON()
- public string renderJQDT()
- public string renderAddForm()
- public string renderEditForm()
- public void addSwitchGroup()
- public void editSwitchGroup()
- public void deleteSwitchGroup()
- public bool checkSwitchGroupProtected()
- public string checkSwitchGroupNameExists()
- public void removeSwitchFromGroup()
Constants
Name | Value |
---|---|
URL_ME | '?module=switchgroups' |
Members
protected
- $messages
—
System message helper object placeholder - $sortByModelName
—
bool
Placeholder for DEVICES_LISTS_SORT_BY_MODELNAME alter.ini option
Methods
protected
- initMessages() — Inits message helper object for further usage
public
- __construct()
- addSwitchGroup() — Adds switch group to DB
- checkSwitchGroupNameExists() — Returns true if switch group with such name already exists
- checkSwitchGroupProtected() — Check if switch group is protected from deletion
- countSwitchesInGroup() — Returns how many switches are there in a group
- deleteSwitchGroup() — Deletes switch group
- editSwitchGroup() — Edits switch group
- getSwitchGroupBySwitchId() — Returns switch group data by switch ID
- getSwitchGroupIdByName() — Finds group Id by it's name
- getSwitchGroupNameById() — Finds group name by it's Id
- getSwitchGroupsData() — Gets switches groups data from DB
- getSwitchesIdsWithGroupsData() — Returns array with all of the switches IDs and their group data side by side
- getSwithcesInGroup() — Returns array of switches in a group
- getUbMsgHelperInstance() — Returns reference to UbillingMessageHelper object
- removeSwitchFromGroup()
- renderAddForm() — Returns switch group addition form
- renderEditForm() — Returns switch group editing form
- renderJQDT() — Returns JQDT control and some JS bindings for dynamic forms
- renderJSON() — Renders JSON for JQDT
- renderSwitchGroupsSelector()
- renderSwitchesInGroupTable() — Returns HTML table with switches list in a group