Constants

ACTION_CLEAN

ACTION_CLEAN

Define number to the action 'clean' of agents

ACTION_STATUS

ACTION_STATUS

Define number to the action 'change status' of agents

Properties

$displaylist

$displaylist : boolean

Initialize the displaylist public variable

Type

boolean

$rightname

$rightname : string

The right name for this class

Type

string

Methods

initConfigModule()

initConfigModule(boolean  $getOnly = FALSE) : array

Initialize config values of fusioninventory plugin

Parameters

boolean $getOnly

Returns

array

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

addValues()

addValues(array  $values, boolean  $update = TRUE) 

Add multiple configuration values

Parameters

array $values

configuration values, indexed by name

boolean $update

say if add or update in database

defineTabs()

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

Define tabs to display on form page

Parameters

array $options

Returns

array —

containing the tabs name

getTabNameForItem()

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

Get the tab name used for item

Parameters

object $item

the item object

integer $withtemplate

1 if is a template form

Returns

string|array —

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

getValue()

getValue(string  $name) : null|string|integer

Get configuration value with name

Parameters

string $name

name in configuration

Returns

null|string|integer

isActive()

isActive(string  $name) : boolean

Give state of a config field for a fusioninventory plugin

Parameters

string $name

name in configuration

Returns

boolean

showForm()

showForm(array  $options = array()) : true

Display form

Parameters

array $options

Returns

true

getActions()

getActions(integer  $action) : string

Get the action for agent action

Parameters

integer $action

Returns

string

showFormInventory()

showFormInventory(array  $options = array()) : true

Display form for tab 'Inventory'

Parameters

array $options

Returns

true

showFormNetworkInventory()

showFormNetworkInventory(array  $options = array()) : true

Display form for tab 'Network inventory'

Parameters

array $options

Returns

true

showFormDeploy()

showFormDeploy(array  $options = array()) : true

Display form for tab 'Deploy'

Parameters

array $options

Returns

true

addValue()

addValue(string  $name, string  $value) : integer|false

Add name + value in configuration if not exist

Parameters

string $name
string $value

Returns

integer|false —

integer is the id of this configuration name

updateValue()

updateValue(string  $name, string  $value) : boolean

Update configuration value

Parameters

string $name

name of configuration

string $value

Returns

boolean

isExtradebugActive()

isExtradebugActive() : null|integer

Check if extradebug mode is activate

Returns

null|integer —

the integer is 1 or 0 (it's like boolean)

logIfExtradebug()

logIfExtradebug(string  $file, string  $message) 

Log when extra-debug is activated

Parameters

string $file

name of log file to update

string $message

the message to put in log file

loadCache()

loadCache() 

Load all configuration in global variable $PF_CONFIG

Test if table exists before loading cache The only case where table doesn't exists is when you click on uninstall the plugin and it's already uninstalled