Version class. More...

List of all members.

Public Member Functions

 cleanDBonPurge ()
 Actions done when item is deleted from the database.
 defineTabs ($options=array())
 Define tabs to display.
 getPreAdditionalInfosForName ()
 showForm ($ID, $options=array())
 Print the Software / version form.
 getSearchOptions ()
 Get the Search options for the given Type.
 getTabNameForItem (CommonGLPI $item, $withtemplate=0)
 Get Tab Name used for itemtype.

Static Public Member Functions

static getTypeName ($nb=0)
 Return the localized name of the current Type Should be overloaded in each new class.
static dropdown ($options=array())
 Make a select box for software to install.
static showForSoftware (Software $soft)
 Show Versions of a software.
static displayTabContentForItem (CommonGLPI $item, $tabnum=1, $withtemplate=0)
 show Tab content

Public Attributes

 $dohistory = true
 Make an history of the changes.

Static Public Attributes

static $itemtype = 'Software'
static $items_id = 'softwares_id'

Detailed Description

Version class.

Definition at line 39 of file softwareversion.class.php.


Member Function Documentation

Actions done when item is deleted from the database.

Returns:
nothing

Reimplemented from CommonDBTM.

Definition at line 54 of file softwareversion.class.php.

References $DB.

defineTabs ( options = array())

Define tabs to display.

NB : Only called for existing object

Parameters:
$optionsarray
  • withtemplate is a template view ?
Returns:
array containing the onglets

Reimplemented from CommonGLPI.

Definition at line 63 of file softwareversion.class.php.

References $options, and CommonGLPI\addStandardTab().

static displayTabContentForItem ( CommonGLPI item,
tabnum = 1,
withtemplate = 0 
) [static]

show Tab content

Since:
version 0.83
Parameters:
$itemCommonGLPI object for which the tab need to be displayed
$tabnuminteger tab number (default 1)
$withtemplateboolean is a template object ? (default 0)
Returns:
true

Reimplemented from CommonGLPI.

Definition at line 325 of file softwareversion.class.php.

References CommonGLPI\getType(), and showForSoftware().

static dropdown ( options = array()) [static]

Make a select box for software to install.

Parameters:
$optionsarray of possible options:
  • name : string / name of the select (default is softwareversions_id)
  • softwares_id : integer / ID of the software
  • value : integer / value of the selected version
  • used : array / already used items
Returns:
nothing (print out an HTML select box)

Reimplemented from CommonDBTM.

Definition at line 195 of file softwareversion.class.php.

References $CFG_GLPI, $options, $params, $rand, $val, and Dropdown\EMPTY_VALUE.

Referenced by showForm().

Since:
version 0.84
See also:
CommonDBTM::getPreAdditionalInfosForName

Reimplemented from CommonDBTM.

Definition at line 78 of file softwareversion.class.php.

References $soft.

Get the Search options for the given Type.

This should be overloaded in Class

Returns:
an array of search options More information on https://forge.indepnet.net/wiki/glpi/SearchEngine

Reimplemented from CommonDBTM.

Definition at line 155 of file softwareversion.class.php.

References __(), and CommonDBTM\getTable().

getTabNameForItem ( CommonGLPI item,
withtemplate = 0 
)

Get Tab Name used for itemtype.

NB : Only called for existing object Must check right on what will be displayed + template

Since:
version 0.83
Parameters:
$itemCommonDBTM object for which the tab need to be displayed
$withtemplateboolean is a template object ? (default 0)
Returns:
string tab name

Reimplemented from CommonGLPI.

Definition at line 307 of file softwareversion.class.php.

References $_SESSION, countElementsInTable(), CommonGLPI\createTabEntry(), CommonDBTM\getTable(), CommonGLPI\getType(), and getTypeName().

static getTypeName ( nb = 0) [static]

Return the localized name of the current Type Should be overloaded in each new class.

Returns:
string

Reimplemented from CommonGLPI.

Definition at line 49 of file softwareversion.class.php.

References $nb, and _n().

Referenced by getTabNameForItem(), and Computer_SoftwareVersion\getTabNameForItem().

showForm ( ID,
options = array() 
)

Print the Software / version form.

Parameters:
$IDinteger Id of the version or the template to print
$optionsarray of possible options:
  • target form target
  • softwares_id ID of the software for add process
Returns:
true if displayed false if item not found or not right to display

Definition at line 99 of file softwareversion.class.php.

References $CFG_GLPI, $options, __(), CommonGLPI\addDivForTabs(), Html\autocompletionTextField(), CommonDBTM\check(), Computer_SoftwareVersion\countForVersion(), SoftwareLicense\countForVersion(), dropdown(), Dropdown\getDropdownName(), Session\haveRight(), CommonDBTM\isNewID(), CommonDBTM\showFormButtons(), CommonDBTM\showFormHeader(), and CommonGLPI\showTabs().


Member Data Documentation

$dohistory = true

Make an history of the changes.

Reimplemented from CommonDBTM.

Definition at line 42 of file softwareversion.class.php.

$items_id = 'softwares_id' [static]

Reimplemented from CommonDBChild.

Definition at line 46 of file softwareversion.class.php.

$itemtype = 'Software' [static]

Reimplemented from CommonDBChild.

Definition at line 45 of file softwareversion.class.php.


The documentation for this class was generated from the following file: