PHP Class CommonTreeDropdown, glpi

Hierarchical and cross entities
Inheritance: extends CommonDropdown
Mostrar archivo Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$can_be_translated

Public Methods

Method Description
adaptTreeFieldsFromUpdateOrAdd ( $input )
cleanTreeText ( $value ) : string reformat text field describing a tree (such as completename)
defineTabs ( $options = [] )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
findID ( array &$input ) : the check if a tree dropdown already exists (before import)
getAdditionalFields ( ) Return Additional Fileds for this type
getCompleteNameFromParents ( $parentCompleteName, $thisName ) Compute completename based on parent one
getSearchOptions ( ) : array Get search function for the class
getSpecificMassiveActions ( $checkitem = NULL )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTreeLink ( ) : string Get the this for all the current item and all its parent
haveChildren ( ) Report if a dropdown have Child Used to (dis)allow delete action
import ( array $input ) : the Import a dropdown - check if already exists
post_addItem ( )
post_deleteFromDB ( )
post_updateItem ( $history = 1 )
pre_deleteItem ( )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
recursiveCleanSonsAboveID ( $ID )
regenerateTreeUnderID ( $ID, $updateName, $changeParent )
showChildren ( ) : Nothing Print the HTML array children of a TreeDropdown
showMassiveActionsSubForm ( MassiveAction $ma )

Method Details

adaptTreeFieldsFromUpdateOrAdd() public method

public adaptTreeFieldsFromUpdateOrAdd ( $input )
$input

cleanTreeText() static public method

reformat text field describing a tree (such as completename)
static public cleanTreeText ( $value ) : string
$value string
return string

defineTabs() public method

public defineTabs ( $options = [] )

displayTabContentForItem() static public method

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

findID() public method

check if a tree dropdown already exists (before import)
public findID ( array &$input ) : the
$input array
return the ID of the new (or -1 if not found)

getAdditionalFields() public method

Return Additional Fileds for this type
public getAdditionalFields ( )

getCompleteNameFromParents() static public method

Compute completename based on parent one
static public getCompleteNameFromParents ( $parentCompleteName, $thisName )
$parentCompleteName string parent complete name (need to be stripslashes / comes from DB)
$thisName string item name (need to be addslashes : comes from input)

getSearchOptions() public method

Get search function for the class
public getSearchOptions ( ) : array
return array of search option

getSpecificMassiveActions() public method

See also: CommonDBTM::getSpecificMassiveActions()
public getSpecificMassiveActions ( $checkitem = NULL )

getTabNameForItem() public method

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

haveChildren() public method

Report if a dropdown have Child Used to (dis)allow delete action
public haveChildren ( )

import() public method

Import a dropdown - check if already exists
public import ( array $input ) : the
$input array array of value to import (name or completename, ...)
return the ID of the new or existing dropdown (0 on failure)

post_addItem() public method

public post_addItem ( )

post_deleteFromDB() public method

public post_deleteFromDB ( )

post_updateItem() public method

public post_updateItem ( $history = 1 )

pre_deleteItem() public method

public pre_deleteItem ( )

prepareInputForAdd() public method

public prepareInputForAdd ( $input )

prepareInputForUpdate() public method

public prepareInputForUpdate ( $input )

processMassiveActionsForOneItemtype() static public method

See also: CommonDBTM::processMassiveActionsForOneItemtype()
static public processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
$ma MassiveAction
$item CommonDBTM
$ids array

recursiveCleanSonsAboveID() public method

public recursiveCleanSonsAboveID ( $ID )
$ID

regenerateTreeUnderID() public method

public regenerateTreeUnderID ( $ID, $updateName, $changeParent )
$ID
$updateName
$changeParent

showChildren() public method

Print the HTML array children of a TreeDropdown
public showChildren ( ) : Nothing
return Nothing (display)

showMassiveActionsSubForm() static public method

See also: CommonDBTM::showMassiveActionsSubForm()
static public showMassiveActionsSubForm ( MassiveAction $ma )
$ma MassiveAction

Property Details

$can_be_translated public_oe property

public $can_be_translated