PHP Class SoftwareLicense, glpi

Inheritance: extends CommonDBTM
ファイルを表示 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
cleanDBonPurge ( )
computeValidityIndicator ( $ID, $number ) : validity Compute licence validity indicator.
countForSoftware ( $softwares_id ) : number Get number of licensesof a software
countForVersion ( $softwareversions_id, $entity = '' ) : number Get number of bought licenses of a version
cronInfo ( $name ) : arrray Give cron information
cronSoftware ( $task = NULL ) Cron action on softwares : alert on expired licences
defineTabs ( $options = [] )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getPreAdditionalInfosForName ( )
getSearchOptions ( )
getSearchOptionsToAdd ( )
getSpecificMassiveActions ( $checkitem = NULL )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb )
getUnicityFieldsToDisplayInErrorMessage ( ) : an Get fields to display in the unicity error message
maybeRecursive ( ) : boolean Is the license may be recursive
post_addItem ( )
post_deleteFromDB ( )
post_updateItem ( $history = 1 )
pre_updateInDB ( )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
showDebug ( ) Display debug information for current object
showForSoftware ( Software $software ) : nothing Show Licenses of a software
showForm ( $ID, $options = [] ) : true Print the Software / license form
updateValidityIndicator ( $ID ) : nothing Update validity indicator of a specific license

Method Details

cleanDBonPurge() public method

public cleanDBonPurge ( )

computeValidityIndicator() static public method

Compute licence validity indicator.
static public computeValidityIndicator ( $ID, $number ) : validity
$ID ID of the licence
$number licence count to check (default -1)
return validity indicator

countForSoftware() static public method

Get number of licensesof a software
static public countForSoftware ( $softwares_id ) : number
$softwares_id software ID
return number of licenses

countForVersion() static public method

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

cronInfo() static public method

Give cron information
static public cronInfo ( $name ) : arrray
$name : task's name
return arrray of information

cronSoftware() static public method

Cron action on softwares : alert on expired licences
static public cronSoftware ( $task = NULL )
$task to log, if NULL display (default NULL)

defineTabs() public method

public defineTabs ( $options = [] )

displayTabContentForItem() static public method

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

getPreAdditionalInfosForName() public method

See also: CommonDBTM::getPreAdditionalInfosForName

getSearchOptions() public method

public getSearchOptions ( )

getSearchOptionsToAdd() static public method

static public getSearchOptionsToAdd ( )

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 )

getUnicityFieldsToDisplayInErrorMessage() public method

Get fields to display in the unicity error message
public getUnicityFieldsToDisplayInErrorMessage ( ) : an
return an array which contains field => label

maybeRecursive() public method

Is the license may be recursive
public maybeRecursive ( ) : boolean
return boolean

post_addItem() public method

public post_addItem ( )

post_deleteFromDB() public method

See also: CommonDBTM::post_deleteFromDB()
public post_deleteFromDB ( )

post_updateItem() public method

See also: CommonDBTM::post_updateItem()
public post_updateItem ( $history = 1 )

pre_updateInDB() public method

public pre_updateInDB ( )

prepareInputForAdd() public method

See also: CommonDBTM::prepareInputForAdd()
public prepareInputForAdd ( $input )

prepareInputForUpdate() public method

See also: CommonDBTM::prepareInputForUpdate()
public prepareInputForUpdate ( $input )

showDebug() public method

Display debug information for current object
public showDebug ( )

showForSoftware() static public method

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

showForm() public method

Print the Software / license form
public showForm ( $ID, $options = [] ) : true
$ID integer Id of the version or the template to print
$options array of possible options: - target form target - softwares_id ID of the software for add process
return true if displayed false if item not found or not right to display

updateValidityIndicator() static public method

Update validity indicator of a specific license
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