PHP 클래스 Infocom, glpi

상속: extends CommonDBChild
파일 보기 프로젝트 열기: glpi-project/glpi 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$auto_message_on_action
$dohistory
$items_id
$itemtype From CommonDBChild
$logs_for_parent Link in message can't work'
$rightname

공개 메소드들

메소드 설명
Amort ( $type_amort, $va, $duree, $coef, $date_achat, $date_use, $date_tax, $view = "n" ) : float Calculate amortissement for an item
addPluginInfos ( CommonDBTM $item )
autofillDates ( &$infocoms = [], $field = '', $action, $params = [] ) : nothing Automatically manage copying one date to another is necessary
canApplyOn ( $item ) : true Check if given object can have InfoCom
cleanDBonPurge ( )
cloneItem ( $itemtype, $oldid, $newid, $newitemtype = '' ) Duplicate infocoms from an item template to its clone
countForSupplier ( Supplier $item )
cronInfo ( $name )
cronInfocom ( $task = NULL ) Cron action on infocom : alert on expired warranty
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
dropdownAlert ( $options )
dropdownAmortType ( $name, $value, $display = true ) Dropdown of amortissement type for infocoms
getAlertName ( $val = NULL ) : array Get the possible value for infocom alert
getAmortTypeName ( $value ) Get amortissement type name for infocoms
getAutoManagemendDatesFields ( ) : an Return all infocom dates that could be automaticall filled
getFromDBforDevice ( $itemtype, $ID ) : true Retrieve an item from the database for a device
getItemtypesThatCanHave ( ) : array Get all the types that can have an infocom
getLogTypeID ( )
getMassiveActionsForItemtype ( array &$actions, $itemtype, $is_deleted, CommonDBTM $checkitem = NULL )
getSearchOptions ( )
getSearchOptionsToAdd ( $itemtype )
getSpecificValueToDisplay ( $field, $values, array $options = [] )
getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb )
getWarrantyExpir ( $from, $addwarranty, $deletenotice, $color = false ) : expiration Get date using a begin date and a period in month
manageDateOnStatusChange ( CommonDBTM $item, $action_add = true ) : nothing Fill, if necessary, automatically some dates when status changes
post_getEmpty ( )
pre_updateInDB ( )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
showDebug ( ) Display debug information for infocom of current object
showDisplayLink ( $itemtype, $device_id ) : float Show infocom link to display modal
showForItem ( CommonDBTM $item, $withtemplate = '' ) Show Infocom form for an item (not a standard showForm)
showTco ( $ticket_tco, $value, $date_achat = "" ) : float Calculate TCO and TCO by month for an item

메소드 상세

Amort() 정적인 공개 메소드

Calculate amortissement for an item
static public Amort ( $type_amort, $va, $duree, $coef, $date_achat, $date_use, $date_tax, $view = "n" ) : float
$type_amort type d'amortisssment "lineaire=2" ou "degressif=1"
$va valeur d'acquisition
$duree duree d'amortissement
$coef coefficient d'amortissement
$date_achat Date d'achat
$date_use Date d'utilisation
$date_tax date du debut de l'annee fiscale
$view "n" pour l'annee en cours ou "all" pour le tableau complet (default 'n')
리턴 float or array

addPluginInfos() 정적인 공개 메소드

static public addPluginInfos ( CommonDBTM $item )
$item CommonDBTM

autofillDates() 정적인 공개 메소드

Automatically manage copying one date to another is necessary
static public autofillDates ( &$infocoms = [], $field = '', $action, $params = [] ) : nothing
리턴 nothing

canApplyOn() 정적인 공개 메소드

Check if given object can have InfoCom
static public canApplyOn ( $item ) : true
$item an object or a string
리턴 true if $object is an object that can have InfoCom

cleanDBonPurge() 공개 메소드

public cleanDBonPurge ( )

cloneItem() 정적인 공개 메소드

Duplicate infocoms from an item template to its clone
static public cloneItem ( $itemtype, $oldid, $newid, $newitemtype = '' )
$itemtype itemtype of the item
$oldid ID of the item to clone
$newid ID of the item cloned
$newitemtype itemtype of the new item (= $itemtype if empty) (default '')

countForSupplier() 정적인 공개 메소드

static public countForSupplier ( Supplier $item )
$item Supplier Supplier object

cronInfo() 정적인 공개 메소드

static public cronInfo ( $name )
$name

cronInfocom() 정적인 공개 메소드

Cron action on infocom : alert on expired warranty
static public cronInfocom ( $task = NULL )
$task to log, if NULL use display (default NULL)

displayTabContentForItem() 정적인 공개 메소드

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

dropdownAlert() 정적인 공개 메소드

static public dropdownAlert ( $options )
$options array

dropdownAmortType() 정적인 공개 메소드

Dropdown of amortissement type for infocoms
static public dropdownAmortType ( $name, $value, $display = true )
$name select name
$value default value (default 0)
$display display or get string (true by default)

getAlertName() 정적인 공개 메소드

Get the possible value for infocom alert
static public getAlertName ( $val = NULL ) : array
$val if not set, ask for all values, else for 1 value (default NULL)
리턴 array or string

getAmortTypeName() 정적인 공개 메소드

Get amortissement type name for infocoms
static public getAmortTypeName ( $value )
$value status ID

getAutoManagemendDatesFields() 정적인 공개 메소드

Return all infocom dates that could be automaticall filled
static public getAutoManagemendDatesFields ( ) : an
리턴 an array with all dates (configuration field & real field)

getFromDBforDevice() 공개 메소드

Retrieve an item from the database for a device
public getFromDBforDevice ( $itemtype, $ID ) : true
$itemtype type of the device to retrieve infocom
$ID ID of the device to retrieve infocom
리턴 true if succeed else false

getItemtypesThatCanHave() 정적인 공개 메소드

Get all the types that can have an infocom
static public getItemtypesThatCanHave ( ) : array
리턴 array of the itemtypes

getLogTypeID() 공개 메소드

public getLogTypeID ( )

getMassiveActionsForItemtype() 정적인 공개 메소드

또한 보기: CommonDBTM::getMassiveActionsForItemtype()
static public getMassiveActionsForItemtype ( array &$actions, $itemtype, $is_deleted, CommonDBTM $checkitem = NULL )
$actions array
$checkitem CommonDBTM

getSearchOptions() 공개 메소드

public getSearchOptions ( )

getSearchOptionsToAdd() 정적인 공개 메소드

static public getSearchOptionsToAdd ( $itemtype )
$itemtype

getSpecificValueToDisplay() 정적인 공개 메소드

static public getSpecificValueToDisplay ( $field, $values, array $options = [] )
$options array

getSpecificValueToSelect() 정적인 공개 메소드

static public getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] )
$field
$name (default '')
$values (default '')
$options array array

getTabNameForItem() 공개 메소드

또한 보기: CommonGLPI::getTabNameForItem()
public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTypeName() 정적인 공개 메소드

static public getTypeName ( $nb )

getWarrantyExpir() 정적인 공개 메소드

Get date using a begin date and a period in month
static public getWarrantyExpir ( $from, $addwarranty, $deletenotice, $color = false ) : expiration
$from date begin date
$addwarranty integer period in months
$deletenotice integer period in months of notice (default 0)
$color boolean if show expire date in red color (false by default)
리턴 expiration date string

manageDateOnStatusChange() 정적인 공개 메소드

Fill, if necessary, automatically some dates when status changes
static public manageDateOnStatusChange ( CommonDBTM $item, $action_add = true ) : nothing
$item CommonDBTM
리턴 nothing

post_getEmpty() 공개 메소드

public post_getEmpty ( )

pre_updateInDB() 공개 메소드

public pre_updateInDB ( )

prepareInputForAdd() 공개 메소드

또한 보기: CommonDBChild::prepareInputForAdd()
public prepareInputForAdd ( $input )

prepareInputForUpdate() 공개 메소드

또한 보기: CommonDBChild::prepareInputForUpdate()
public prepareInputForUpdate ( $input )

processMassiveActionsForOneItemtype() 정적인 공개 메소드

또한 보기: CommonDBTM::processMassiveActionsForOneItemtype()
static public processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
$ma MassiveAction
$item CommonDBTM
$ids array

showDebug() 공개 메소드

Display debug information for infocom of current object
public showDebug ( )

showForItem() 정적인 공개 메소드

Show Infocom form for an item (not a standard showForm)
static public showForItem ( CommonDBTM $item, $withtemplate = '' )
$item CommonDBTM CommonDBTM object
$withtemplate integer template or basic item (default '')

showTco() 정적인 공개 메소드

Calculate TCO and TCO by month for an item
static public showTco ( $ticket_tco, $value, $date_achat = "" ) : float
$ticket_tco Tco part of tickets
$value
$date_achat (default '')
리턴 float

프로퍼티 상세

$auto_message_on_action 공개적으로 프로퍼티

public $auto_message_on_action

$dohistory 공개적으로 프로퍼티

public $dohistory

$items_id 공개적으로 정적으로 프로퍼티

public static $items_id

$itemtype 공개적으로 정적으로 프로퍼티

From CommonDBChild
public static $itemtype

$logs_for_parent 공개적으로 정적으로 프로퍼티

Link in message can't work'
public static $logs_for_parent

$rightname 정적으로 공개적으로 프로퍼티

static public $rightname