32 public $table_element =
'workstation_workstation_resource';
35 public $element =
'workstationresource';
40 public $fields = array(
41 'fk_workstation' => array(
'type' =>
'integer'),
42 'fk_resource' => array(
'type' =>
'integer')
48 public $fk_workstation;
68 foreach ($this->fields as $key => $val) {
69 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
70 unset($this->fields[$key]);
75 if (is_object($langs)) {
76 foreach ($this->fields as $key => $val) {
77 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
78 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
79 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
96 return parent::getAllItemsLinkedByObjectID($fk_workstation,
'fk_resource',
'fk_workstation', $obj->table_element);
108 $obj =
new self($db);
109 return parent::deleteAllItemsLinkedByObjectID($fk_workstation,
'fk_workstation', $obj->table_element);
Parent class of all other business classes (invoices, contracts, proposals, orders,...
Class to link resource with Workstations.
static getAllResourcesOfWorkstation($fk_workstation)
Function used to get an array with all resources linked to a workstation.
__construct($db)
WorkstationResource constructor.
static deleteAllResourcesOfWorkstation($fk_workstation)
Function used to remove all resources linked to a workstation.