/** * Add a new graphic card component * * @param type $data * @param type $computers_id * @param type $no_history * * @return nothing */ function addGraphicCard($data, $computers_id, $no_history) { $item_DeviceGraphicCard = new Item_DeviceGraphicCard(); $deviceGraphicCard = new DeviceGraphicCard(); $graphiccards_id = $deviceGraphicCard->import($data); $data['devicegraphiccards_id'] = $graphiccards_id; $data['itemtype'] = 'Computer'; $data['items_id'] = $computers_id; $data['is_dynamic'] = 1; $data['_no_history'] = $no_history; $item_DeviceGraphicCard->add($data, array(), !$no_history); }