PHP Class Software, glpi

Mostra file Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$dohistory From CommonDBTM
$rightname

Protected Properties

Property Type Description
$forward_entity_to
$usenotepad

Public Methods

Method Description
addOrRestoreFromTrash ( $name, $manufacturer, $entity, $comment = '', $is_recursive = false, $is_helpdesk_visible = NULL ) Add a software. If already exist in dustbin restore it
addSoftware ( $name, $manufacturer_id, $entity, $comment = '', $is_recursive = false, $is_helpdesk_visible = NULL ) : the Create a new software
cleanDBonPurge ( )
defineTabs ( $options = [] )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
dropdownLicenseToInstall ( $myname, $entity_restrict ) : nothing Make a select box for license software to associate
dropdownSoftwareToInstall ( $myname, $entity_restrict ) : nothing Make a select box for software to install
getEmpty ( )
getMenuShorcut ( )
getSearchOptions ( )
getSpecificMassiveActions ( $checkitem = NULL )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb )
merge ( $item ) : boolean Merge softwares with current
post_addItem ( )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
putInTrash ( $ID, $comment = '' ) : boolean Put software in dustbin because it's been removed by GLPI software dictionnary
removeFromTrash ( $ID ) : boolean Restore a software from dustbin
showForm ( $ID, $options = [] ) : boolean Print the Software form
showMergeCandidates ( ) : nothing Show softwares candidates to be merged with the current
updateValidityIndicator ( $ID ) : nothing Update validity indicator of a specific software

Method Details

addOrRestoreFromTrash() public method

Add a software. If already exist in dustbin restore it
public addOrRestoreFromTrash ( $name, $manufacturer, $entity, $comment = '', $is_recursive = false, $is_helpdesk_visible = NULL )

addSoftware() public method

Create a new software
public addSoftware ( $name, $manufacturer_id, $entity, $comment = '', $is_recursive = false, $is_helpdesk_visible = NULL ) : the
return the software's ID

cleanDBonPurge() public method

public cleanDBonPurge ( )

defineTabs() public method

public defineTabs ( $options = [] )

displayTabContentForItem() static public method

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

dropdownLicenseToInstall() static public method

Make a select box for license software to associate
static public dropdownLicenseToInstall ( $myname, $entity_restrict ) : nothing
$myname select name
$entity_restrict restrict to a defined entity
return nothing (print out an HTML select box)

dropdownSoftwareToInstall() static public method

Make a select box for software to install
static public dropdownSoftwareToInstall ( $myname, $entity_restrict ) : nothing
$myname select name
$entity_restrict restrict to a defined entity
return nothing (print out an HTML select box)

getEmpty() public method

public getEmpty ( )

getMenuShorcut() static public method

See also: CommonGLPI::getMenuShorcut() @since version 0.85
static public getMenuShorcut ( )

getSearchOptions() public method

public getSearchOptions ( )

getSpecificMassiveActions() public method

See also: CommonDBTM::getSpecificMassiveActions()
public getSpecificMassiveActions ( $checkitem = NULL )

getTabNameForItem() public method

public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTypeName() static public method

static public getTypeName ( $nb )

merge() public method

Merge softwares with current
public merge ( $item ) : boolean
$item array of software ID to be merged
return boolean about success

post_addItem() public method

public post_addItem ( )

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

putInTrash() public method

Put software in dustbin because it's been removed by GLPI software dictionnary
public putInTrash ( $ID, $comment = '' ) : boolean
$ID the ID of the software to put in dustbin
$comment the comment to add to the already existing software's comment (default '')
return boolean (success)

removeFromTrash() public method

Restore a software from dustbin
public removeFromTrash ( $ID ) : boolean
$ID the ID of the software to put in dustbin
return boolean (success)

showForm() public method

Print the Software form
public showForm ( $ID, $options = [] ) : boolean
$ID integer ID of the item
$options array of possible options: - target filename : where to go when done. - withtemplate boolean : template or basic item
return boolean item found

showMergeCandidates() public method

Show softwares candidates to be merged with the current
public showMergeCandidates ( ) : nothing
return nothing

updateValidityIndicator() static public method

Update validity indicator of a specific software
static public updateValidityIndicator ( $ID ) : nothing
$ID ID of the licence
return nothing

Property Details

$dohistory public_oe property

From CommonDBTM
public $dohistory

$forward_entity_to protected_oe static_oe property

protected static $forward_entity_to

$rightname static_oe public_oe property

static public $rightname

$usenotepad protected_oe property

protected $usenotepad