33 public $table_element =
'workstation_workstation_usergroup';
36 public $element =
'workstationusergroup';
41 public $fields = array(
42 'fk_workstation' => array(
'type' =>
'integer',
'label' =>
'Workstation',
'enabled' => 1,
'position' => 10,
'visible' => 1),
43 'fk_usergroup' => array(
'type' =>
'integer',
'label' =>
'UserGroup',
'enabled' => 1,
'position' => 20,
'visible' => 1),
49 public $fk_workstation;
69 foreach ($this->fields as $key => $val) {
70 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
71 unset($this->fields[$key]);
76 if (is_object($langs)) {
77 foreach ($this->fields as $key => $val) {
78 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
79 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
80 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
98 return parent::getAllItemsLinkedByObjectID($fk_workstation,
'fk_usergroup',
'fk_workstation', $obj->table_element);
111 $obj =
new self($db);
112 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.