PHP 클래스 NetworkPort, glpi

상속: extends CommonDBChild
파일 보기 프로젝트 열기: glpi-project/glpi 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$checkParentRights
$dohistory
$items_id
$itemtype From CommonDBChild
$rightname

보호된 프로퍼티들

프로퍼티 타입 설명
$forward_entity_to

공개 메소드들

메소드 설명
cleanDBonPurge ( )
cloneItem ( $itemtype, $old_items_id, $new_items_id ) Clone the current NetworkPort when the item is clone
countForItem ( CommonDBTM $item )
defineTabs ( $options = [] )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getAvailableDisplayOptions ( ) : all Get available display options array
getConnexityMassiveActionsSpecificities ( )
getContact ( $ID ) : ID Get port opposite port ID if linked item
getForbiddenStandardMassiveAction ( )
getInstantiation ( ) : the \brief get the instantiation of the current NetworkPort The instantiation rely on the instantiation_type field and the id of the NetworkPort. If the network port exists, but not its instantiation, then, the instantiation will be empty.
getNetworkPortInstantiations ( ) : array \brief get the list of available network port type.
getNetworkPortInstantiationsWithNames ( )
getPreAdditionalInfosForName ( )
getSearchOptions ( )
getSearchOptionsToAdd ( $itemtype )
getSpecificMassiveActions ( $checkitem = NULL )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb )
post_addItem ( )
post_updateItem ( $history = 1 )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
resetConnections ( $ID ) : true Delete All connection of the given network port
showForItem ( CommonDBTM $item, $withtemplate = '' ) Show ports for an item
showForm ( $ID, $options = [] )
splitInputForElements ( $input ) \brief split input fields when validating a port
switchInstantiationType ( $new_instantiation_type ) : false Change the instantion type of a NetworkPort : check validity of the new type of instantiation and that it is not equal to current ones. Update the NetworkPort and delete the previous instantiation. It is up to the caller to create the new instantiation !
updateDependencies ( $history = true ) \brief update all related elements after adding or updating an element

메소드 상세

cleanDBonPurge() 공개 메소드

public cleanDBonPurge ( )

cloneItem() 정적인 공개 메소드

Clone the current NetworkPort when the item is clone
static public cloneItem ( $itemtype, $old_items_id, $new_items_id )
$itemtype the type of the item that was clone
$old_items_id the id of the item that was clone
$new_items_id the id of the item after beeing cloned

countForItem() 정적인 공개 메소드

static public countForItem ( CommonDBTM $item )
$item CommonDBTM

defineTabs() 공개 메소드

public defineTabs ( $options = [] )

displayTabContentForItem() 정적인 공개 메소드

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

getAvailableDisplayOptions() 정적인 공개 메소드

Get available display options array
static public getAvailableDisplayOptions ( ) : all
리턴 all the options

getConnexityMassiveActionsSpecificities() 정적인 공개 메소드

또한 보기: CommonDBConnexity::getConnexityMassiveActionsSpecificities()

getContact() 공개 메소드

Get port opposite port ID if linked item
public getContact ( $ID ) : ID
$ID networking port ID
리턴 ID of the NetworkPort found, false if not found

getForbiddenStandardMassiveAction() 공개 메소드

getInstantiation() 공개 메소드

\brief get the instantiation of the current NetworkPort The instantiation rely on the instantiation_type field and the id of the NetworkPort. If the network port exists, but not its instantiation, then, the instantiation will be empty.
public getInstantiation ( ) : the
리턴 the instantiation object or false if the type of instantiation is not known

getNetworkPortInstantiations() 정적인 공개 메소드

\brief get the list of available network port type.
static public getNetworkPortInstantiations ( ) : array
리턴 array of available type of network ports

getNetworkPortInstantiationsWithNames() 정적인 공개 메소드

getPreAdditionalInfosForName() 공개 메소드

또한 보기: CommonDBTM::getPreAdditionalInfosForName

getSearchOptions() 공개 메소드

public getSearchOptions ( )

getSearchOptionsToAdd() 정적인 공개 메소드

static public getSearchOptionsToAdd ( $itemtype )
$itemtype

getSpecificMassiveActions() 공개 메소드

또한 보기: CommonDBTM::getSpecificMassiveActions()
public getSpecificMassiveActions ( $checkitem = NULL )

getTabNameForItem() 공개 메소드

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

getTypeName() 정적인 공개 메소드

static public getTypeName ( $nb )

post_addItem() 공개 메소드

또한 보기: CommonDBTM::post_addItem
public post_addItem ( )

post_updateItem() 공개 메소드

또한 보기: CommonDBTM::post_updateItem
public post_updateItem ( $history = 1 )

prepareInputForAdd() 공개 메소드

또한 보기: CommonDBTM::prepareInputForAdd
public prepareInputForAdd ( $input )

prepareInputForUpdate() 공개 메소드

또한 보기: CommonDBTM::prepareInputForUpdate
public prepareInputForUpdate ( $input )

resetConnections() 공개 메소드

Delete All connection of the given network port
public resetConnections ( $ID ) : true
$ID ID of the port
리턴 true on success

showForItem() 정적인 공개 메소드

Show ports for an item
static public showForItem ( CommonDBTM $item, $withtemplate = '' )
$item CommonDBTM CommonDBTM object
$withtemplate integer withtemplate param (default '')

showForm() 공개 메소드

public showForm ( $ID, $options = [] )

splitInputForElements() 공개 메소드

The form of the NetworkPort can contain the details of the NetworkPortInstantiation as well as NetworkName elements (if no more than one name is attached to this port). Feilds from both NetworkPortInstantiation and NetworkName must not be process by the NetworkPort::add or NetworkPort::update. But they must be kept for adding or updating these elements. This is done after creating or updating the current port. Otherwise, its ID may not be known (in case of new port). To keep the unused fields, we check each field key. If it is owned by NetworkPort (ie : exists inside the $this->fields array), then they remain inside $input. If they are prefix by "Networkname_", then they are added to $this->input_for_NetworkName. Else, they are for the instantiation and added to $this->input_for_instantiation. This method must be call before NetworkPort::add or NetworkPort::update in case of NetworkPort form. Otherwise, the entry of the database may contain wrong values.
또한 보기: updateDependencies for the update
public splitInputForElements ( $input )
$input

switchInstantiationType() 공개 메소드

Change the instantion type of a NetworkPort : check validity of the new type of instantiation and that it is not equal to current ones. Update the NetworkPort and delete the previous instantiation. It is up to the caller to create the new instantiation !
public switchInstantiationType ( $new_instantiation_type ) : false
$new_instantiation_type the name of the new instaniation type
리턴 false on error, true if the previous instantiation is not available (ie.: invalid instantiation type) or the object of the previous instantiation.

updateDependencies() 공개 메소드

splitInputForElements() prepare the data for adding or updating NetworkPortInstantiation and NetworkName. This method will update NetworkPortInstantiation and NetworkName. I must be call after NetworkPort::add or NetworkPort::update otherwise, the networkport ID will not be known and the dependencies won't have a valid items_id field.
또한 보기: splitInputForElements() for preparing the input
public updateDependencies ( $history = true )
$history (default 1)

프로퍼티 상세

$checkParentRights 공개적으로 정적으로 프로퍼티

public static $checkParentRights

$dohistory 공개적으로 프로퍼티

public $dohistory

$forward_entity_to 보호되어 있는 정적으로 프로퍼티

protected static $forward_entity_to

$items_id 공개적으로 정적으로 프로퍼티

public static $items_id

$itemtype 공개적으로 정적으로 프로퍼티

From CommonDBChild
public static $itemtype

$rightname 정적으로 공개적으로 프로퍼티

static public $rightname