\PluginFusioninventoryCommonView

It's a common code for display information in GLPI.

Summary

Methods
Properties
Constants
__construct()
getBaseUrlFor()
showList()
showTextField()
showIntegerField()
showCheckboxField()
showDropdownForItemtype()
showDropdownFromArray()
showDateTimeField()
showTextArea()
getMessage()
$base_urls
MSG_INFO
MSG_WARNING
MSG_ERROR
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

MSG_INFO

MSG_INFO

Define the number for the message information constant

MSG_WARNING

MSG_WARNING

Define the number for the message warning constant

MSG_ERROR

MSG_ERROR

Define the number for the message error constant

Properties

$base_urls

$base_urls : array

Define default value for the base URLs

Type

array

Methods

__construct()

__construct() 

__contruct function and the different base URLs

getBaseUrlFor()

getBaseUrlFor(string  $name) : string

Get a specific url root by type name

Parameters

string $name

the type of url requested (can be used for ajax call or pictures location)

Returns

string —

the requested url if found otherwise empty string

showList()

showList() 

Show Search list for this itemtype

showTextField()

showTextField(string  $title, string  $varname) 

Display input form element

Parameters

string $title
string $varname

showIntegerField()

showIntegerField(string  $title, string  $varname, array  $options = array()) 

Display input form element only with numbers

Parameters

string $title
string $varname
array $options

showCheckboxField()

showCheckboxField(string  $title, string  $varname, array  $options = array()) 

Display checkbox form element

Parameters

string $title
string $varname
array $options

showDropdownForItemtype()

showDropdownForItemtype(string  $title, string  $itemtype, array  $options = array()) : string

Display dropdown form element for itemtype

Parameters

string $title
string $itemtype

a glpi/plugin itemtype

array $options

Returns

string —

the rand number can be used with ajax to update something

showDropdownFromArray()

showDropdownFromArray(string  $title, string  $varname, array  $values = array(), array  $options = array()) : string

Display dropdown form element with array data

Parameters

string $title
string $varname
array $values
array $options

Returns

string —

the rand number can be used with ajax to update something

showDateTimeField()

showDateTimeField(string  $title, string  $varname, array  $options = array()) 

Display date time select form element

Parameters

string $title
string $varname
array $options

showTextArea()

showTextArea(string  $title, string  $varname) 

Display a text area form element

Parameters

string $title
string $varname

getMessage()

getMessage(string  $msg, integer  $type = self::MSG_INFO) : string

Get a HTML message

Parameters

string $msg
integer $type

Returns

string