PHP Class Computer_Item, glpi

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

Méthodes publiques

Свойство Type Description
$checkItem_2_Rights
$items_id_1
$items_id_2
$itemtype_1 From CommonDBRelation
$itemtype_2

Méthodes publiques

Méthode Description
cleanDBonPurge ( ) : nothing Actions done when item is deleted from the database Overloaded to manage autoupdate feature
cloneComputer ( $oldid, $newid ) Duplicate connected items to computer from an item template to its clone
cloneItem ( $itemtype, $oldid, $newid ) Duplicate connected items to item from an item template to its clone
countForAll ( Computer $comp, CommonDBTM $item ) : integer: Count connection for a Computer and an itemtype
countForComputer ( Computer $comp ) : integer: Count connection for a Computer
countForItem ( CommonDBTM $item ) : integer: Count connection for an item
disconnectForItem ( CommonDBTM $item ) : boolean Disconnect an item to its computer
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
dropdownAllConnect ( $fromtype, $myname, $entity_restrict, $onlyglobal, $used = [] ) : nothing Make a select box for connections
dropdownConnect ( $itemtype, $fromtype, $myname, $entity_restrict, $onlyglobal, $used = [] ) : nothing Make a select box for connections
getForbiddenStandardMassiveAction ( )
getMassiveActionsForItemtype ( array &$actions, $itemtype, $is_deleted, CommonDBTM $checkitem = NULL )
getRelationMassiveActionsSpecificities ( )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
prepareInputForAdd ( $input ) : the Prepare input datas for adding the relation
showForComputer ( Computer $comp, $withtemplate = '' ) : Nothing Print the form for computers or templates connections to printers, screens or peripherals
showForItem ( CommonDBTM $item, $withtemplate = '' ) : nothing Prints a direct connection to a computer
unglobalizeItem ( CommonDBTM $item ) Unglobalize an item : duplicate item and connections

Method Details

cleanDBonPurge() public méthode

Actions done when item is deleted from the database Overloaded to manage autoupdate feature
public cleanDBonPurge ( ) : nothing
Résultat nothing

cloneComputer() static public méthode

Duplicate connected items to computer from an item template to its clone
static public cloneComputer ( $oldid, $newid )
$oldid ID of the item to clone
$newid ID of the item cloned

cloneItem() static public méthode

Duplicate connected items to item from an item template to its clone
static public cloneItem ( $itemtype, $oldid, $newid )
$itemtype type of the item to clone
$oldid ID of the item to clone
$newid ID of the item cloned

countForAll() static public méthode

Count connection for a Computer and an itemtype
static public countForAll ( Computer $comp, CommonDBTM $item ) : integer:
$comp Computer Computer object
$item CommonDBTM CommonDBTM object
Résultat integer:

countForComputer() static public méthode

Count connection for a Computer
static public countForComputer ( Computer $comp ) : integer:
$comp Computer Computer object
Résultat integer:

countForItem() static public méthode

Count connection for an item
static public countForItem ( CommonDBTM $item ) : integer:
$item CommonDBTM CommonDBTM object
Résultat integer:

disconnectForItem() public méthode

Disconnect an item to its computer
public disconnectForItem ( CommonDBTM $item ) : boolean
$item CommonDBTM CommonDBTM object: the Monitor/Phone/Peripheral/Printer
Résultat boolean : action succeeded

displayTabContentForItem() static public méthode

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

dropdownAllConnect() static public méthode

Make a select box for connections
static public dropdownAllConnect ( $fromtype, $myname, $entity_restrict, $onlyglobal, $used = [] ) : nothing
$fromtype from where the connection is
$myname select name
$entity_restrict Restrict to a defined entity (default = -1)
$onlyglobal display only global devices (used for templates) (default 0)
$used array Already used items ID: not to display in dropdown
Résultat nothing (print out an HTML select box)

dropdownConnect() static public méthode

Make a select box for connections
static public dropdownConnect ( $itemtype, $fromtype, $myname, $entity_restrict, $onlyglobal, $used = [] ) : nothing
$itemtype type to connect
$fromtype from where the connection is
$myname select name
$entity_restrict Restrict to a defined entity (default = -1)
$onlyglobal display only global devices (used for templates) (default 0)
$used array Already used items ID: not to display in dropdown
Résultat nothing (print out an HTML select box)

getForbiddenStandardMassiveAction() public méthode

getMassiveActionsForItemtype() static public méthode

See also: CommonDBTM::getMassiveActionsForItemtype()
static public getMassiveActionsForItemtype ( array &$actions, $itemtype, $is_deleted, CommonDBTM $checkitem = NULL )
$actions array
$checkitem CommonDBTM

getRelationMassiveActionsSpecificities() static public méthode

See also: CommonDBRelation::getRelationMassiveActionsSpecificities()

getTabNameForItem() public méthode

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

prepareInputForAdd() public méthode

Overloaded to check is Disconnect needed (during OCS sync) and to manage autoupdate feature
public prepareInputForAdd ( $input ) : the
$input array of datas used to add the item
Résultat the modified $input array

showForComputer() static public méthode

Print the form for computers or templates connections to printers, screens or peripherals
static public showForComputer ( Computer $comp, $withtemplate = '' ) : Nothing
$comp Computer Computer object
$withtemplate boolean Template or basic item (default '')
Résultat Nothing (call to classes members)

showForItem() static public méthode

Prints a direct connection to a computer
static public showForItem ( CommonDBTM $item, $withtemplate = '' ) : nothing
$item CommonDBTM CommonDBTM object: the Monitor/Phone/Peripheral/Printer
$withtemplate integer withtemplate param (default '')
Résultat nothing (print out a table)

unglobalizeItem() static public méthode

Unglobalize an item : duplicate item and connections
static public unglobalizeItem ( CommonDBTM $item )
$item CommonDBTM CommonDBTM object to unglobalize

Property Details

$checkItem_2_Rights public_oe static_oe property

public static $checkItem_2_Rights

$items_id_1 public_oe static_oe property

public static $items_id_1

$items_id_2 public_oe static_oe property

public static $items_id_2

$itemtype_1 public_oe static_oe property

From CommonDBRelation
public static $itemtype_1

$itemtype_2 public_oe static_oe property

public static $itemtype_2