ConsumableItem Class. More...

List of all members.

Public Member Functions

 getPostAdditionalInfosForName ()
 cleanDBonPurge ()
 Actions done when item is deleted from the database.
 post_getEmpty ()
 Actions done at the end of the getEmpty function.
 defineTabs ($options=array())
 Define tabs to display.
 showForm ($ID, $options=array())
 Print the consumable type form.
 getSpecificMassiveActions ($checkitem=NULL)
 getSearchOptions ()
 Get the Search options for the given Type.
 getEvents ()
 showDebug ()
 Display debug information for current object.

Static Public Member Functions

static getTypeName ($nb=0)
 Return the localized name of the current Type Should be overloaded in each new class.
static canCreate ()
 Have I the global right to "create" the Object May be overloaded if needed (ex KnowbaseItem)
static canView ()
 Have I the global right to "view" the Object.
static cronInfo ($name)
static cronConsumable ($task=NULL)
 Cron action on consumables : alert if a stock is behind the threshold.

Static Protected Attributes

static $forward_entity_to = array('Consumable', 'Infocom')
 Forward entity datas to linked items.

Detailed Description

ConsumableItem Class.

This class is used to manage the various types of consumables.

See also:
Consumable
Author:
Julien Dombre

Definition at line 44 of file consumableitem.class.php.


Member Function Documentation

static canCreate ( ) [static]

Have I the global right to "create" the Object May be overloaded if needed (ex KnowbaseItem)

Returns:
booleen

Reimplemented from CommonDBTM.

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

References haveRight().

static canView ( ) [static]

Have I the global right to "view" the Object.

Default is true and check entity if the objet is entity assign

May be overloaded if needed

Returns:
booleen

Reimplemented from CommonDBTM.

Definition at line 59 of file consumableitem.class.php.

References haveRight().

Actions done when item is deleted from the database.

Returns:
nothing

Reimplemented from CommonDBTM.

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

References CommonGLPI\getType().

static cronConsumable ( task = NULL) [static]

Cron action on consumables : alert if a stock is behind the threshold.

Parameters:
$taskto log, if NULL display (default NULL)
Returns:
0 : nothing to do 1 : done with success

Definition at line 297 of file consumableitem.class.php.

References $CFG_GLPI, $DB, $entity, $input, $items, $options, $task, __(), Session\addMessageAfterRedirect(), Dropdown\getDropdownName(), Entity\getEntitiesToNotify(), Consumable\getUnusedNumber(), NotificationEvent\raiseEvent(), and Alert\THRESHOLD.

static cronInfo ( name) [static]

Definition at line 285 of file consumableitem.class.php.

References __().

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 96 of file consumableitem.class.php.

References $options, and CommonGLPI\addStandardTab().

getEvents ( )

Definition at line 388 of file consumableitem.class.php.

References __().

Since:
version 0.84
See also:
CommonDBTM::getPostAdditionalInfosForName

Reimplemented from CommonDBTM.

Definition at line 69 of file consumableitem.class.php.

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 209 of file consumableitem.class.php.

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

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 48 of file consumableitem.class.php.

References $nb, and _n().

Actions done at the end of the getEmpty function.

Returns:
nothing

Reimplemented from CommonDBTM.

Definition at line 88 of file consumableitem.class.php.

References Entity\getUsedConfig().

showDebug ( )

Display debug information for current object.

Definition at line 396 of file consumableitem.class.php.

References $item, $options, NotificationEvent\debugEvent(), and CommonDBTM\getEntityID().

showForm ( ID,
options = array() 
)

Print the consumable type form.

Parameters:
$IDinteger ID of the item
$optionsarray
  • target filename : where to go when done.
  • withtemplate boolean : template or basic item
Returns:
Nothing (display)

Definition at line 120 of file consumableitem.class.php.

References $CFG_GLPI, $options, __(), CommonGLPI\addDivForTabs(), Html\autocompletionTextField(), Alert\displayLastAlert(), CommonDBTM\dropdown(), CommonDBTM\initForm(), CommonDBTM\showFormButtons(), CommonDBTM\showFormHeader(), Dropdown\showInteger(), and CommonGLPI\showTabs().


Member Data Documentation

$forward_entity_to = array('Consumable', 'Infocom') [static, protected]

Forward entity datas to linked items.

Reimplemented from CommonDBTM.

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


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