PHP Class CommonITILCost, glpi

Inheritance: extends CommonDBChild
Afficher le fichier Open project: glpi-project/glpi Class Usage Examples

Méthodes publiques

Свойство Type Description
$dohistory

Méthodes publiques

Méthode Description
computeTotalCost ( $actiontime, $cost_time, $cost_fixed, $cost_material, $edit = true ) : total Computer total cost of a item
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getCostsSummary ( $type, $ID ) : array Get costs summary values
getItilObjectItemType ( )
getLastCostForItem ( $items_id ) Get last datas for an item
getSearchOptions ( )
getSearchOptionsToAdd ( )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTotalActionTimeForItem ( $items_id ) Get total actiNULL 11400 0.0000 0.0000 0.0000 on time used on costs for an item
getTypeName ( $nb )
initBasedOnPrevious ( ) Init cost for creation based on previous cost
showForObject ( $item, $withtemplate = '' ) : total Print the item costs
showForm ( $ID, $options = [] ) Print the item cost form

Method Details

computeTotalCost() static public méthode

Computer total cost of a item
static public computeTotalCost ( $actiontime, $cost_time, $cost_fixed, $cost_material, $edit = true ) : total
$actiontime float actiontime
$cost_time float time cost
$cost_fixed float fixed cost
$cost_material float material cost
$edit boolean used for edit of computation ? (true by default)
Résultat total cost formatted string

displayTabContentForItem() static public méthode

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

getCostsSummary() static public méthode

Get costs summary values
static public getCostsSummary ( $type, $ID ) : array
$type string type
$ID integer ID of the ticket
Résultat array of costs and actiontime

getItilObjectItemType() public méthode

getLastCostForItem() public méthode

Get last datas for an item
public getLastCostForItem ( $items_id )
$items_id integer ID of the item

getSearchOptions() public méthode

public getSearchOptions ( )

getSearchOptionsToAdd() static public méthode

static public getSearchOptionsToAdd ( )

getTabNameForItem() public méthode

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

getTotalActionTimeForItem() public méthode

Get total actiNULL 11400 0.0000 0.0000 0.0000 on time used on costs for an item
public getTotalActionTimeForItem ( $items_id )
$items_id integer ID of the item

getTypeName() static public méthode

static public getTypeName ( $nb )

initBasedOnPrevious() public méthode

Init cost for creation based on previous cost
public initBasedOnPrevious ( )

showForObject() static public méthode

Print the item costs
static public showForObject ( $item, $withtemplate = '' ) : total
$item CommonITILObject object or Project
$withtemplate boolean Template or basic item (default '')
Résultat total cost

showForm() public méthode

Print the item cost form
public showForm ( $ID, $options = [] )
$ID integer ID of the item
$options array options used

Property Details

$dohistory public_oe property

public $dohistory