PHP Class Printer, 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 = '' ) Add a printer. If already exist in dustbin restore it
addPrinter ( $name, $manufacturer, $entity, $comment = '' ) : the Create a new printer
canUnrecurs ( ) : booleen Can I change recusvive flag to false check if there is "linked" object in another entity
cleanDBonPurge ( )
defineTabs ( $options = [] )
getLinkedItems ( ) : an Return the linked items (in computers_items)
getSearchOptions ( )
getSpecificMassiveActions ( $checkitem = NULL )
getTypeName ( $nb ) Name of the type
post_addItem ( )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
removeFromTrash ( $ID ) : boolean Restore a software from dustbin
showForm ( $ID, $options = [] ) : boolean Print the printer form
useDeletedToLockIfDynamic ( )

Method Details

addOrRestoreFromTrash() public method

Add a printer. If already exist in dustbin restore it
public addOrRestoreFromTrash ( $name, $manufacturer, $entity, $comment = '' )
$name the printer's name (need to be addslashes)
$manufacturer the software's manufacturer (need to be addslashes)
$entity the entity in which the software must be added
$comment comment (default '')

addPrinter() public method

Create a new printer
public addPrinter ( $name, $manufacturer, $entity, $comment = '' ) : the
$name the printer's name (need to be addslashes)
$manufacturer the printer's manufacturer (need to be addslashes)
$entity the entity in which the printer must be added
$comment (default '')
return the printer's ID

canUnrecurs() public method

Overloaded from CommonDBTM
public canUnrecurs ( ) : booleen
return booleen

cleanDBonPurge() public method

public cleanDBonPurge ( )

defineTabs() public method

public defineTabs ( $options = [] )

getLinkedItems() public method

Return the linked items (in computers_items)
public getLinkedItems ( ) : an
return an array of linked items like array('Computer' => array(1,2), 'Printer' => array(5,6))

getSearchOptions() public method

public getSearchOptions ( )

getSpecificMassiveActions() public method

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

getTypeName() static public method

Name of the type
static public getTypeName ( $nb )
$nb : number of item in the type

post_addItem() public method

public post_addItem ( )

prepareInputForAdd() public method

public prepareInputForAdd ( $input )

prepareInputForUpdate() public method

public prepareInputForUpdate ( $input )

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 printer 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

useDeletedToLockIfDynamic() public method

See also: CommonDBTM::useDeletedToLockIfDynamic()

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