PHP Class Computer_SoftwareVersion, glpi

Inheritance: extends CommonDBRelation
Show file Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$items_id_1
$items_id_2
$itemtype_1 From CommonDBRelation
$itemtype_2
$log_history_1_add
$log_history_1_delete
$log_history_2_add
$log_history_2_delete

Public Methods

Method Description
cloneComputer ( $oldid, $newid ) Duplicate all software from a computer template to its clone
countForSoftware ( $softwares_id ) : number Get number of installed versions of a software
countForVersion ( $softwareversions_id, $entity = '' ) : number Get number of installed licenses of a version
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
showForComputer ( Computer $comp, $withtemplate = '' ) : nothing Show software installed on a computer
showForSoftware ( Software $software ) : nothing Show installation of a Software
showForVersion ( SoftwareVersion $version ) : nothing Show installation of a Version
showForVersionByEntity ( SoftwareVersion $version ) : nothing Show number of installations per entity
showMassiveActionsSubForm ( MassiveAction $ma )
updateDatasForComputer ( $computers_id )
upgrade ( $instID, $softwareversions_id, $dohistory = 1 ) : nothing Update version installed on a computer

Private Methods

Method Description
displaySoftsByLicense ( $data, $computers_id, $withtemplate, $canedit ) : nothing Display a software for a License (not installed)
showInstallations ( $searchID, $crit ) : nothing Show installations of a software
softsByCategory ( $data, $computers_id, $withtemplate, $canedit, $display ) : array Display a installed software for a category

Method Details

cloneComputer() static public method

Duplicate all software from a computer template to its clone
static public cloneComputer ( $oldid, $newid )
$oldid ID of the computer to clone
$newid ID of the computer cloned

countForSoftware() static public method

Get number of installed versions of a software
static public countForSoftware ( $softwares_id ) : number
$softwares_id software ID
return number of installations

countForVersion() static public method

Get number of installed licenses of a version
static public countForVersion ( $softwareversions_id, $entity = '' ) : number
$softwareversions_id version ID
$entity to search for computer in (default '' = all active entities) (default '')
return number of installations

displayTabContentForItem() static public method

static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
$item CommonGLPI CommonGLPI object
$tabnum (default 1)
$withtemplate (default 0)

getTabNameForItem() public method

See also: CommonGLPI::getTabNameForItem()
public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTypeName() static public method

static public getTypeName ( $nb )

prepareInputForAdd() public method

public prepareInputForAdd ( $input )

prepareInputForUpdate() public method

public prepareInputForUpdate ( $input )

processMassiveActionsForOneItemtype() static public method

See also: CommonDBTM::processMassiveActionsForOneItemtype()
static public processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
$ma MassiveAction
$item CommonDBTM
$ids array

showForComputer() static public method

Show software installed on a computer
static public showForComputer ( Computer $comp, $withtemplate = '' ) : nothing
$comp Computer Computer object
$withtemplate template case of the view process (default '')
return nothing

showForSoftware() static public method

Show installation of a Software
static public showForSoftware ( Software $software ) : nothing
$software Software Software object
return nothing

showForVersion() static public method

Show installation of a Version
static public showForVersion ( SoftwareVersion $version ) : nothing
$version SoftwareVersion SoftwareVersion object
return nothing

showForVersionByEntity() static public method

Show number of installations per entity
static public showForVersionByEntity ( SoftwareVersion $version ) : nothing
$version SoftwareVersion SoftwareVersion object
return nothing

showMassiveActionsSubForm() static public method

See also: CommonDBTM::showMassiveActionsSubForm()
static public showMassiveActionsSubForm ( MassiveAction $ma )
$ma MassiveAction

updateDatasForComputer() public method

public updateDatasForComputer ( $computers_id )
$computers_id

upgrade() public method

Update version installed on a computer
public upgrade ( $instID, $softwareversions_id, $dohistory = 1 ) : nothing
$instID ID of the install software lienk
$softwareversions_id ID of the new version
$dohistory Do history ? (default 1)
return nothing

Property Details

$items_id_1 public static property

public static $items_id_1

$items_id_2 public static property

public static $items_id_2

$itemtype_1 public static property

From CommonDBRelation
public static $itemtype_1

$itemtype_2 public static property

public static $itemtype_2

$log_history_1_add public static property

public static $log_history_1_add

$log_history_1_delete public static property

public static $log_history_1_delete

$log_history_2_add public static property

public static $log_history_2_add

$log_history_2_delete public static property

public static $log_history_2_delete