31 public $table_element =
'workstation_workstation_usergroup';
34 public $element =
'workstationusergroup';
39 public $fields = array(
40 'fk_workstation' => array(
'type' =>
'integer'),
41 'fk_usergroup' => array(
'type' =>
'integer')
47 public $fk_workstation;
67 foreach ($this->fields as $key => $val) {
68 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
69 unset($this->fields[$key]);
74 if (is_object($langs)) {
75 foreach ($this->fields as $key => $val) {
76 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
77 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
78 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
96 return parent::getAllItemsLinkedByObjectID($fk_workstation,
'fk_usergroup',
'fk_workstation', $obj->table_element);
109 $obj =
new self($db);
110 return parent::deleteAllItemsLinkedByObjectID($fk_workstation,
'fk_workstation', $obj->table_element);
Parent class of all other business classes (invoices, contracts, proposals, orders,...
Class to link User groups and Workstations.
static deleteAllGroupsOfWorkstation($fk_workstation)
Function used to remove all usergroups linked to a workstation.
static getAllGroupsOfWorkstation($fk_workstation)
Function used to get an array with all usergroups linked to a workstation.
__construct($db)
WorkstationUserGroup constructor.