PHP 클래스 Consumable, glpi

This file is part of Print Master. Print Master is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Print Master is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Print Master. If not, see .
상속: extends fActiveRecord
파일 보기 프로젝트 열기: glpi-project/glpi 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$items_id
$itemtype From CommonDBChild
$no_form_page
$rightname

보호된 프로퍼티들

프로퍼티 타입 설명
$forward_entity_to From CommonDBTM

공개 메소드들

메소드 설명
backToStock ( array $input, $history = 1 ) send back to stock
cleanDBonPurge ( )
countForConsumableItem ( ConsumableItem $item )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getCount ( $tID, $alarm_threshold, $nohtml ) : string Get the consumable count HTML array for a defined consumable type
getForbiddenStandardMassiveAction ( )
getNameField ( ) since version 0.84
getOldNumber ( $tID ) : integer count how many old consumable for the consumable item $tID
getPreAdditionalInfosForName ( )
getRights ( $interface = 'central' )
getStatus ( $cID ) : string Get the localized string for the status of a consumable
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTotalNumber ( $tID ) : integer count how many consumable for the consumable item $tID
getTypeName ( $nb )
getUnusedNumber ( $tID ) : integer count how many consumable unused for the consumable item $tID
isNew ( $cID ) Check if a Consumable is New (not used, in stock)
isOld ( $cID ) Check if a consumable is Old (used, not in stock)
out ( $ID, $itemtype = '', $items_id ) : boolean UnLink a consumable linked to a printer
post_addItem ( )
prepareInputForAdd ( $input )
processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
showAddForm ( ConsumableItem $consitem ) : Nothing Print out a link to add directly a new consumable from a consumable item.
showForConsumableItem ( ConsumableItem $consitem, $show_old ) : Nothing Print out the consumables of a defined type
showMassiveActionsSubForm ( MassiveAction $ma )
showSummary ( ) Show the usage summary of consumables by user

메소드 상세

backToStock() 공개 메소드

send back to stock
public backToStock ( array $input, $history = 1 )
$input array

cleanDBonPurge() 공개 메소드

public cleanDBonPurge ( )

countForConsumableItem() 정적인 공개 메소드

static public countForConsumableItem ( ConsumableItem $item )
$item ConsumableItem string ConsumableItem object

displayTabContentForItem() 정적인 공개 메소드

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

getCount() 정적인 공개 메소드

Get the consumable count HTML array for a defined consumable type
static public getCount ( $tID, $alarm_threshold, $nohtml ) : string
$tID integer consumable item identifier.
$alarm_threshold integer threshold alarm value.
$nohtml integer Return value without HTML tags. (default 0)
리턴 string to display

getForbiddenStandardMassiveAction() 공개 메소드

getNameField() 정적인 공개 메소드

since version 0.84
또한 보기: CommonDBTM::getNameField()
static public getNameField ( )

getOldNumber() 정적인 공개 메소드

count how many old consumable for the consumable item $tID
static public getOldNumber ( $tID ) : integer
$tID integer consumable item identifier.
리턴 integer : number of old consumable counted.

getPreAdditionalInfosForName() 공개 메소드

또한 보기: CommonDBTM::getPreAdditionalInfosForName

getRights() 공개 메소드

public getRights ( $interface = 'central' )

getStatus() 정적인 공개 메소드

Get the localized string for the status of a consumable
static public getStatus ( $cID ) : string
$cID integer consumable ID.
리턴 string : dict value for the consumable status.

getTabNameForItem() 공개 메소드

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

getTotalNumber() 정적인 공개 메소드

count how many consumable for the consumable item $tID
static public getTotalNumber ( $tID ) : integer
$tID integer consumable item identifier.
리턴 integer : number of consumable counted.

getTypeName() 정적인 공개 메소드

static public getTypeName ( $nb )

getUnusedNumber() 정적인 공개 메소드

count how many consumable unused for the consumable item $tID
static public getUnusedNumber ( $tID ) : integer
$tID integer consumable item identifier.
리턴 integer : number of consumable unused counted.

isNew() 정적인 공개 메소드

Check if a Consumable is New (not used, in stock)
static public isNew ( $cID )
$cID integer consumable ID.

isOld() 정적인 공개 메소드

Check if a consumable is Old (used, not in stock)
static public isOld ( $cID )
$cID integer consumable ID.

out() 공개 메소드

UnLink the consumable identified by $ID
public out ( $ID, $itemtype = '', $items_id ) : boolean
$ID consumable identifier
$itemtype itemtype of who we give the consumable (default '')
$items_id ID of the item giving the consumable (default 0)
리턴 boolean

post_addItem() 공개 메소드

public post_addItem ( )

prepareInputForAdd() 공개 메소드

public prepareInputForAdd ( $input )

processMassiveActionsForOneItemtype() 정적인 공개 메소드

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

showAddForm() 정적인 공개 메소드

Print out a link to add directly a new consumable from a consumable item.
static public showAddForm ( ConsumableItem $consitem ) : Nothing
$consitem ConsumableItem ConsumableItem object
리턴 Nothing (displays)

showForConsumableItem() 정적인 공개 메소드

Print out the consumables of a defined type
static public showForConsumableItem ( ConsumableItem $consitem, $show_old ) : Nothing
$consitem ConsumableItem ConsumableItem object
$show_old boolean show old consumables or not. (default 0)
리턴 Nothing (displays)

showMassiveActionsSubForm() 정적인 공개 메소드

또한 보기: CommonDBTM::showMassiveActionsSubForm()
static public showMassiveActionsSubForm ( MassiveAction $ma )
$ma MassiveAction

showSummary() 정적인 공개 메소드

Show the usage summary of consumables by user
static public showSummary ( )

프로퍼티 상세

$forward_entity_to 보호되어 있는 정적으로 프로퍼티

From CommonDBTM
protected static $forward_entity_to

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

public static $items_id

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

From CommonDBChild
public static $itemtype

$no_form_page 공개적으로 프로퍼티

public $no_form_page

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

static public $rightname