Properties

$dohistory

$dohistory : boolean

We activate the history.

Type

boolean

$rightname

$rightname : string

The right name for this class

Type

string

Methods

getTypeName()

getTypeName(integer  $nb) : string

Get name of this type by language of the user connected

Parameters

integer $nb

number of elements

Returns

string —

name of this type

useDeletedToLockIfDynamic()

useDeletedToLockIfDynamic() : boolean

Check is use deleted to lock if dynamic

Returns

boolean

getMenuName()

getMenuName() : string

Get menu name

Returns

string

getMenuContent()

getMenuContent() : array

Get content menu breadcrumb

Returns

array

getSearchOptions()

getSearchOptions() : array

Get search function for the class

Returns

array

getTabNameForItem()

getTabNameForItem(object  $item, integer  $withtemplate) : string

Get the tab name used for item

Parameters

object $item

the item object

integer $withtemplate

1 if is a template form

Returns

string —

name of the tab

displayTabContentForItem()

displayTabContentForItem(object  $item, integer  $tabnum = 1, integer  $withtemplate) : boolean

Display the content of the tab

Parameters

object $item
integer $tabnum

number of the tab to display

integer $withtemplate

1 if is a template form

Returns

boolean

defineTabs()

defineTabs(array  $options = array()) : array

Define tabs to display on form page

Parameters

array $options

Returns

array —

containing the tabs name

getSpecificMassiveActions()

getSpecificMassiveActions(object|null  $checkitem = NULL) : array

Get the massive actions for this object

Parameters

object|null $checkitem

Returns

array —

list of actions

showMassiveActionsSubForm()

showMassiveActionsSubForm(object  $ma) : boolean

Display form related to the massive action selected

Parameters

object $ma

MassiveAction instance

Returns

boolean

processMassiveActionsForOneItemtype()

processMassiveActionsForOneItemtype(object  $ma, object  $item, array  $ids) 

Execution code for massive action

Parameters

object $ma

MassiveAction instance

object $item

item on which execute the code

array $ids

list of ID on which execute the code

showForm()

showForm(integer  $id, array  $options = array()) : true

Display form for unmanaged device

Parameters

integer $id

id of the unmanaged device

array $options

Returns

true

importForm()

importForm(string  $target, integer  $id) 

Form to import devices in GLPI inventory (computer, printer.

..)

Parameters

string $target

target page

integer $id

id of the unmanaged

cleanOrphelinsConnections()

cleanOrphelinsConnections() 

Clean orphelins connections

hubNetwork()

hubNetwork(object  $pfNetworkport, array  $a_mac) 

Manage a hub (many mac on a port mean you have a hub)

Parameters

object $pfNetworkport

Informations of the network port (switch port)

array $a_mac

deleteNonUsedPortHub()

deleteNonUsedPortHub(integer  $hub_id, array  $a_portUsed) 

Delete all ports connected in hub and not found in last inventory

Parameters

integer $hub_id

id of the hub (unmanaged device)

array $a_portUsed

list of the ports found in last inventory

connectPortToHub()

connectPortToHub(array  $a_port, integer  $hub_id) : integer

Connect a port to hub

Parameters

array $a_port

datas of a port

integer $hub_id

id of the hub (unmanaged device)

Returns

integer —

id of the port of the hub where port is connected

disconnectDB()

disconnectDB(integer  $ports_id) 

Disconnect a port

Parameters

integer $ports_id

searchIfmacOnHub()

searchIfmacOnHub(array  $a_port, array  $a_portglpi) : false|integer

Search if port yet connected to hub

Parameters

array $a_port

datas of a port

array $a_portglpi

all ports connected to the hub

Returns

false|integer —

id of the port of the hub where port is connected

createHub()

createHub(  $pfNetworkport, array  $a_mac) : integer

Creation of a hub

Parameters

$pfNetworkport
array $a_mac

Returns

integer —

id of the hub (unmanageddevice)

releaseHub()

releaseHub(integer  $hub_id, object  $pfNetworkport, array  $a_mac) 

Remove all connections on a hub

Parameters

integer $hub_id

id of the hub

object $pfNetworkport

Informations of the network port

array $a_mac

purgeUnmanagedDevice()

purgeUnmanagedDevice(object  $parm) 

Purge unmanaged devices

Parameters

object $parm

object to purge

import()

import(integer  $items_id, integer  $Import, integer  $NoImport) : array

Function to import discovered device

Parameters

integer $items_id
integer $Import
integer $NoImport

Returns

array

cleanDBonPurge()

cleanDBonPurge() 

Clean linked elements when purge an item