PHP Класс Computer_Item, glpi

Наследование: extends CommonDBRelation
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$checkItem_2_Rights
$items_id_1
$items_id_2
$itemtype_1 From CommonDBRelation
$itemtype_2

Открытые методы

Метод Описание
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

Описание методов

cleanDBonPurge() публичный Метод

Actions done when item is deleted from the database Overloaded to manage autoupdate feature
public cleanDBonPurge ( ) : nothing
Результат nothing

cloneComputer() статический публичный Метод

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() статический публичный Метод

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() статический публичный Метод

Count connection for a Computer and an itemtype
static public countForAll ( Computer $comp, CommonDBTM $item ) : integer:
$comp Computer Computer object
$item CommonDBTM CommonDBTM object
Результат integer:

countForComputer() статический публичный Метод

Count connection for a Computer
static public countForComputer ( Computer $comp ) : integer:
$comp Computer Computer object
Результат integer:

countForItem() статический публичный Метод

Count connection for an item
static public countForItem ( CommonDBTM $item ) : integer:
$item CommonDBTM CommonDBTM object
Результат integer:

disconnectForItem() публичный Метод

Disconnect an item to its computer
public disconnectForItem ( CommonDBTM $item ) : boolean
$item CommonDBTM CommonDBTM object: the Monitor/Phone/Peripheral/Printer
Результат boolean : action succeeded

displayTabContentForItem() статический публичный Метод

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

dropdownAllConnect() статический публичный Метод

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
Результат nothing (print out an HTML select box)

dropdownConnect() статический публичный Метод

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
Результат nothing (print out an HTML select box)

getForbiddenStandardMassiveAction() публичный Метод

getMassiveActionsForItemtype() статический публичный Метод

См. также: CommonDBTM::getMassiveActionsForItemtype()
static public getMassiveActionsForItemtype ( array &$actions, $itemtype, $is_deleted, CommonDBTM $checkitem = NULL )
$actions array
$checkitem CommonDBTM

getRelationMassiveActionsSpecificities() статический публичный Метод

См. также: CommonDBRelation::getRelationMassiveActionsSpecificities()

getTabNameForItem() публичный Метод

См. также: CommonGLPI::getTabNameForItem()
public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

prepareInputForAdd() публичный Метод

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
Результат the modified $input array

showForComputer() статический публичный Метод

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 '')
Результат Nothing (call to classes members)

showForItem() статический публичный Метод

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 '')
Результат nothing (print out a table)

unglobalizeItem() статический публичный Метод

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

Описание свойств

$checkItem_2_Rights публичное статическое свойство

public static $checkItem_2_Rights

$items_id_1 публичное статическое свойство

public static $items_id_1

$items_id_2 публичное статическое свойство

public static $items_id_2

$itemtype_1 публичное статическое свойство

From CommonDBRelation
public static $itemtype_1

$itemtype_2 публичное статическое свойство

public static $itemtype_2