PHP Class NetworkName, glpi

represent the internet name of an element. It is compose of the name itself, its domain and one or several IP addresses (IPv4 and/or IPv6). An address can be affected to an item, or can be "free" to be reuse by another item (for instance, in case of maintenance, when you change the network card of a computer, but not its network information)
Inheritance: extends FQDNLabel
Exibir arquivo Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$canDeleteOnItemClean
$checkParentRights
$dohistory
$items_id
$itemtype From CommonDBChild
$mustBeAttached
$rightname

Protected Properties

Property Type Description
$forward_entity_to

Public Methods

Method Description
affectAddress ( $networkNameID, $items_id, $itemtype )
cleanDBonPurge ( )
countForItem ( CommonDBTM $item )
defineTabs ( $options = [] )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getHTMLTableCellsForItem ( HTMLTableRow $row = NULL, CommonDBTM $item = NULL, HTMLTableCell $father = NULL, array $options = [] )
getHTMLTableHeader ( $itemtype, HTMLTableBase $base, HTMLTableSuperHeader $super = NULL, HTMLTableHeader $father = NULL, array $options = [] )
getInternetNameFromID ( $ID ) : its Get the full name (internet name) of a NetworkName
getSearchOptions ( )
getSearchOptionsToAdd ( array &$tab, array $joinparams, $itemtype )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb )
post_addItem ( )
post_updateItem ( $history = 1 )
post_workOnItem ( ) \brief Update IPAddress database Update IPAddress database to remove old IPs and add new ones.
showForItem ( CommonDBTM $item, $withtemplate ) \brief Show names for an item from its form Beware that the rendering can be different if readden from direct item form (ie : add new NetworkName, remove, .
showForm ( $ID, $options = [] ) : Nothing Print the network name form
showFormForNetworkPort ( $networkPortID )
unaffectAddressByID ( $networkNameID ) \brief dettach an address from an item
unaffectAddressesOfItem ( $items_id, $itemtype ) \brief dettach an address from an item

Method Details

affectAddress() static public method

static public affectAddress ( $networkNameID, $items_id, $itemtype )
$networkNameID
$items_id
$itemtype

cleanDBonPurge() public method

public cleanDBonPurge ( )

countForItem() static public method

static public countForItem ( CommonDBTM $item )
$item CommonDBTM CommonDBTM object

defineTabs() public method

public defineTabs ( $options = [] )

displayTabContentForItem() static public method

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

getHTMLTableCellsForItem() static public method

static public getHTMLTableCellsForItem ( HTMLTableRow $row = NULL, CommonDBTM $item = NULL, HTMLTableCell $father = NULL, array $options = [] )
$row HTMLTableRow HTMLTableRow object (default NULL)
$item CommonDBTM CommonDBTM object (default NULL)
$father HTMLTableCell HTMLTableCell object (default NULL)
$options array array

getHTMLTableHeader() static public method

static public getHTMLTableHeader ( $itemtype, HTMLTableBase $base, HTMLTableSuperHeader $super = NULL, HTMLTableHeader $father = NULL, array $options = [] )
$itemtype
$base HTMLTableBase HTMLTableBase object
$super HTMLTableSuperHeader HTMLTableSuperHeader object (default NULL
$father HTMLTableHeader HTMLTableHeader object (default NULL)
$options array array

getInternetNameFromID() static public method

Get the full name (internet name) of a NetworkName
static public getInternetNameFromID ( $ID ) : its
$ID ID of the NetworkName
return its internet name, or empty string if invalid NetworkName

getSearchOptions() public method

public getSearchOptions ( )

getSearchOptionsToAdd() static public method

static public getSearchOptionsToAdd ( array &$tab, array $joinparams, $itemtype )
$tab array array the array to fill
$joinparams array array
$itemtype

getTabNameForItem() public method

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

getTypeName() static public method

static public getTypeName ( $nb )

post_addItem() public method

public post_addItem ( )

post_updateItem() public method

public post_updateItem ( $history = 1 )

post_workOnItem() public method

\brief Update IPAddress database Update IPAddress database to remove old IPs and add new ones.
public post_workOnItem ( )

showForItem() static public method

..) or if readden from item of the item (for instance from the computer form through NetworkPort::ShowForItem).
static public showForItem ( CommonDBTM $item, $withtemplate )
$item CommonDBTM CommonGLPI object
$withtemplate integer withtemplate param (default 0)

showForm() public method

Print the network name form
public showForm ( $ID, $options = [] ) : Nothing
$ID integer ID of the item
$options array - target for the Form - withtemplate template or basic computer
return Nothing (display)

showFormForNetworkPort() static public method

static public showFormForNetworkPort ( $networkPortID )
$networkPortID

unaffectAddressByID() static public method

The address can be unaffected, and remain "free"
static public unaffectAddressByID ( $networkNameID )
$networkNameID the id of the NetworkName

unaffectAddressesOfItem() static public method

The address can be unaffected, and remain "free"
static public unaffectAddressesOfItem ( $items_id, $itemtype )
$items_id the id of the item
$itemtype the type of the item

Property Details

$canDeleteOnItemClean public_oe static_oe property

public static $canDeleteOnItemClean

$checkParentRights public_oe static_oe property

public static $checkParentRights

$dohistory public_oe property

public $dohistory

$forward_entity_to protected_oe static_oe property

protected static $forward_entity_to

$items_id public_oe static_oe property

public static $items_id

$itemtype public_oe static_oe property

From CommonDBChild
public static $itemtype

$mustBeAttached public_oe static_oe property

public static $mustBeAttached

$rightname static_oe public_oe property

static public $rightname