/** * Add a new sound card component * * @param type $data * @param type $computers_id * @param type $no_history * * @return nothing */ function addSoundCard($data, $computers_id, $no_history) { $item_DeviceSoundCard = new Item_DeviceSoundCard(); $deviceSoundCard = new DeviceSoundCard(); $sounds_id = $deviceSoundCard->import($data); $data['devicesoundcards_id'] = $sounds_id; $data['itemtype'] = 'Computer'; $data['items_id'] = $computers_id; $data['is_dynamic'] = 1; $data['_no_history'] = $no_history; $item_DeviceSoundCard->add($data, array(), !$no_history); }