List of all members.

Public Member Functions

 useDeletedToLockIfDynamic ()
 defineTabs ($options=array())
 Define tabs to display.
 canUnrecurs ()
 Can I change recusvive flag to false check if there is "linked" object in another entity.
 prepareInputForAdd ($input)
 Prepare input datas for adding the item.
 prepareInputForUpdate ($input)
 Prepare input datas for updating the item.
 post_addItem ()
 Actions done after the ADD of the item in the database.
 cleanDBonPurge ()
 Actions done when item is deleted from the database.
 showForm ($ID, $options=array())
 Print the printer form.
 getSelectLinkedItem ()
 Return the SQL command to retrieve linked object.
 getSpecificMassiveActions ($checkitem=NULL)
 showSpecificMassiveActionsParameters ($input=array())
 doSpecificMassiveActions ($input=array())
 getSearchOptions ()
 Get the Search options for the given Type.
 addOrRestoreFromTrash ($name, $manufacturer, $entity, $comment='')
 Add a printer.
 addPrinter ($name, $manufacturer, $entity, $comment= '')
 Create a new printer.
 removeFromTrash ($ID)
 Restore a software from dustbin.

Static Public Member Functions

static getTypeName ($nb=0)
 Name of the type.
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.

Public Attributes

 $dohistory = true
 Make an history of the changes.

Static Protected Attributes

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

Detailed Description

Definition at line 40 of file printer.class.php.


Member Function Documentation

addOrRestoreFromTrash ( name,
manufacturer,
entity,
comment = '' 
)

Add a printer.

If already exist in dustbin restore it

Parameters:
$namethe printer's name (need to be addslashes)
$manufacturerthe software's manufacturer (need to be addslashes)
$entitythe entity in which the software must be added
$commentcomment (default '')

Definition at line 745 of file printer.class.php.

References $DB, $entity, $name, addPrinter(), and removeFromTrash().

addPrinter ( name,
manufacturer,
entity,
comment = '' 
)

Create a new printer.

Parameters:
$namethe printer's name (need to be addslashes)
$manufacturerthe printer's manufacturer (need to be addslashes)
$entitythe entity in which the printer must be added
$comment(default '')
Returns:
the printer's ID

Definition at line 788 of file printer.class.php.

References $CFG_GLPI, $DB, $entity, $input, $name, $sql, CommonDBTM\add(), getEntitiesRestrictRequest(), and Dropdown\importExternal().

Referenced by addOrRestoreFromTrash().

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 58 of file printer.class.php.

References haveRight().

Can I change recusvive flag to false check if there is "linked" object in another entity.

Overloaded from CommonDBTM

Returns:
booleen

Reimplemented from CommonDBTM.

Definition at line 106 of file printer.class.php.

References $CFG_GLPI, $DB, $item, $res, $sql, countElementsInTable(), getAncestorsOf(), getItemForItemtype(), and getTableForItemType().

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 63 of file printer.class.php.

References haveRight().

Actions done when item is deleted from the database.

Returns:
nothing

Reimplemented from CommonDBTM.

Definition at line 228 of file printer.class.php.

References $conn, $DB, $query, and $result.

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 78 of file printer.class.php.

References $options, and CommonGLPI\addStandardTab().

doSpecificMassiveActions ( input = array())
See also:
CommonDBTM::doSpecificMassiveActions()

Reimplemented from CommonDBTM.

Definition at line 544 of file printer.class.php.

References $input, and $res.

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 563 of file printer.class.php.

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

Return the SQL command to retrieve linked object.

Returns:
a SQL command which return a set of (itemtype, items_id)

Reimplemented from CommonDBTM.

Definition at line 494 of file printer.class.php.

static getTypeName ( nb = 0) [static]

Name of the type.

Parameters:
$nb: number of item in the type

Reimplemented from CommonGLPI.

Definition at line 53 of file printer.class.php.

References $nb, and _n().

Actions done after the ADD of the item in the database.

Returns:
nothing

Reimplemented from CommonDBTM.

Definition at line 204 of file printer.class.php.

References $CFG_GLPI, $DB, Document_Item\cloneItem(), Contract_Item\cloneItem(), Computer_Item\cloneItem(), NetworkPort\cloneItem(), Infocom\cloneItem(), and CommonGLPI\getType().

prepareInputForAdd ( input)

Prepare input datas for adding the item.

Parameters:
$inputdatas used to add the item
Returns:
the modified $input array

Reimplemented from CommonDBTM.

Definition at line 168 of file printer.class.php.

References $input.

prepareInputForUpdate ( input)

Prepare input datas for updating the item.

Parameters:
$inputdatas used to update the item
Returns:
the modified $input array

Reimplemented from CommonDBTM.

Definition at line 191 of file printer.class.php.

References $input.

removeFromTrash ( ID)

Restore a software from dustbin.

Parameters:
$IDthe ID of the software to put in dustbin
Returns:
boolean (success)

Definition at line 825 of file printer.class.php.

References CommonDBTM\restore().

Referenced by addOrRestoreFromTrash().

showForm ( ID,
options = array() 
)

Print the printer form.

Parameters:
$IDinteger ID of the item
$optionsarray of possible options:
  • target filename : where to go when done.
  • withtemplate boolean : template or basic item
Returns:
boolean item found

Definition at line 267 of file printer.class.php.

References $_SESSION, $CFG_GLPI, $options, $target, __(), _e(), CommonGLPI\addDivForTabs(), Html\autocompletionTextField(), autoName(), CommonDBTM\can(), Html\convDateTime(), Plugin\doHook(), CommonDBTM\dropdown(), CommonGLPI\getFormURL(), CommonGLPI\getType(), CommonDBTM\initForm(), CommonDBTM\showFormButtons(), CommonDBTM\showFormHeader(), Dropdown\showGlobalSwitch(), CommonGLPI\showTabs(), and Dropdown\showYesNo().

showSpecificMassiveActionsParameters ( input = array())
See also:
CommonDBTM::showSpecificMassiveActionsParameters()

Reimplemented from CommonDBTM.

Definition at line 526 of file printer.class.php.

References $input.

See also:
CommonDBTM::useDeletedToLockIfDynamic()
Since:
version 0.84

Reimplemented from CommonDBTM.

Definition at line 73 of file printer.class.php.


Member Data Documentation

$dohistory = true

Make an history of the changes.

Reimplemented from CommonDBTM.

Definition at line 43 of file printer.class.php.

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

Forward entity datas to linked items.

Reimplemented from CommonDBTM.

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


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