PHP Class Item_Devices, glpi

..
Inheritance: extends CommonDBRelation
Mostra file Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$items_id_1
$itemtype_1
$log_history_1_add
$log_history_1_delete
$log_history_1_lock
$log_history_1_unlock
$log_history_1_update
$logs_for_item_2
$mustBeAttached_1
$no_form_page ..
$take_entity_1
$take_entity_2

Protected Properties

Property Type Description
$forward_entity_to
$notable static public $checkItem_1_Rights = self::DONT_CHECK_ITEM_RIGHTS;

Public Methods

Method Description
addDevices ( $numberToAdd, $itemtype, $items_id, $devices_id, $input = [] )
addDevicesFromPOST ( $input ) Add one or several device(s) from front/item_devices.form.php.
affectItem_Device ( $item_devices_id, $items_id, $itemtype ) : boolean
canView ( )
cleanItemDeviceDBOnItemDelete ( $itemtype, $items_id, $unaffect )
cloneItem ( $itemtype, $oldid, $newid )
defineTabs ( $options = [] )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getConcernedItems ( ) : array Get all kind of items that can be used by Item_Device*
getConnexityMassiveActionsSpecificities ( )
getDeviceForeignKey ( )
getDeviceType ( ) : string Get associated device to the current item_device
getDeviceTypes ( ) : array Get all the kind of devices available inside the system.
getForbiddenStandardMassiveAction ( )
getItemAffinities ( $itemtype ) : array Get the Item_Device* a given item type can have
getRights ( $interface = 'central' )
getSearchOptions ( )
getSpecificities ( $specif = '' ) : array Get the specificities of the given device. For instance, the serial number, the size of the memory, the frequency of the CPUs .
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTableGroup ( CommonDBTM $item, HTMLTableMain $table, array $options, HTMLTableSuperHeader $delete_all_column = NULL, HTMLTableSuperHeader $common_column, HTMLTableSuperHeader $specific_column, HTMLTableSuperHeader $delete_column = NULL, $dynamic_column ) Get the group of elements regarding given item.
getTypeName ( $nb )
itemAffinity ( ) : array Get the items on which this Item_Device can be attached. For instance, a computer can have any kind of device. Conversely, a soundcard does not concern a NetworkEquipment
showForItem ( CommonGLPI $item, $withtemplate )
showForm ( $ID, $options = [] )
updateAll ( $input )

Method Details

addDevices() public method

public addDevices ( $numberToAdd, $itemtype, $items_id, $devices_id, $input = [] )
$numberToAdd
$itemtype
$items_id
$devices_id
$input array to complete (permit to define values)

addDevicesFromPOST() static public method

Add one or several device(s) from front/item_devices.form.php.
static public addDevicesFromPOST ( $input )
$input array of input: should be $_POST

affectItem_Device() static public method

static public affectItem_Device ( $item_devices_id, $items_id, $itemtype ) : boolean
$item_devices_id
$items_id
$itemtype
return boolean

canView() static public method

static public canView ( )

cleanItemDeviceDBOnItemDelete() static public method

static public cleanItemDeviceDBOnItemDelete ( $itemtype, $items_id, $unaffect )
$itemtype
$items_id
$unaffect

cloneItem() static public method

static public cloneItem ( $itemtype, $oldid, $newid )

defineTabs() public method

See also: CommonGLPI::defineTabs()
public defineTabs ( $options = [] )

displayTabContentForItem() static public method

static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
$item CommonGLPI

getConcernedItems() static public method

Get all kind of items that can be used by Item_Device*
static public getConcernedItems ( ) : array
return array of the available items

getConnexityMassiveActionsSpecificities() static public method

See also: CommonDBConnexity::getConnexityMassiveActionsSpecificities()

getDeviceForeignKey() static public method

static public getDeviceForeignKey ( )

getDeviceType() static public method

Get associated device to the current item_device
static public getDeviceType ( ) : string
return string containing the device

getDeviceTypes() static public method

This method is equivalent to getItemAffinities('')
static public getDeviceTypes ( ) : array
return array of the types of Item_Device* available

getForbiddenStandardMassiveAction() public method

See also: CommonDBTM::getForbiddenStandardMassiveAction()

getItemAffinities() static public method

Get the Item_Device* a given item type can have
static public getItemAffinities ( $itemtype ) : array
$itemtype the type of the item that we want to know its devices
return array of Item_Device*

getRights() public method

See also: commonDBTM::getRights()
public getRights ( $interface = 'central' )

getSearchOptions() public method

See also: CommonDBRelation::getSearchOptions()
public getSearchOptions ( )

getSpecificities() static public method

..
static public getSpecificities ( $specif = '' ) : array
$specif string specificity to display Should be overloaded by Item_Device*
return array of the specificities: index is the field name and the values are the attributs of the specificity (long name, short name, size)

getTabNameForItem() public method

public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTableGroup() public method

Two kind of item : - Device* feed by a link to the attached item (Computer, Printer ...) - Computer, Printer ...: feed by the "global" properties of the CommonDevice Then feed with the specificities of the Item_Device elements In cas of $item is an instance, then $options contains the type of the item (Computer, Printer ...).
public getTableGroup ( CommonDBTM $item, HTMLTableMain $table, array $options, HTMLTableSuperHeader $delete_all_column = NULL, HTMLTableSuperHeader $common_column, HTMLTableSuperHeader $specific_column, HTMLTableSuperHeader $delete_column = NULL, $dynamic_column )
$item CommonDBTM
$table HTMLTableMain
$options array array
$delete_all_column HTMLTableSuperHeader (default NULL)
$common_column HTMLTableSuperHeader
$specific_column HTMLTableSuperHeader
$delete_column HTMLTableSuperHeader (default NULL)
$dynamic_column

getTypeName() static public method

static public getTypeName ( $nb )

itemAffinity() static public method

Should be overloaded by Item_Device*
static public itemAffinity ( ) : array
return array of the itemtype that can have this Item_Device

showForItem() static public method

static public showForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

showForm() public method

public showForm ( $ID, $options = [] )

updateAll() static public method

static public updateAll ( $input )
$input array of input: should be $_POST

Property Details

$forward_entity_to protected_oe static_oe property

protected static $forward_entity_to

$items_id_1 public_oe static_oe property

public static $items_id_1

$itemtype_1 public_oe static_oe property

public static $itemtype_1

$log_history_1_add public_oe static_oe property

public static $log_history_1_add

$log_history_1_delete public_oe static_oe property

public static $log_history_1_delete

$log_history_1_lock public_oe static_oe property

public static $log_history_1_lock

$log_history_1_unlock public_oe static_oe property

public static $log_history_1_unlock

$log_history_1_update public_oe static_oe property

public static $log_history_1_update

$logs_for_item_2 public_oe static_oe property

public static $logs_for_item_2

$mustBeAttached_1 public_oe static_oe property

public static $mustBeAttached_1

$no_form_page public_oe property

..
public $no_form_page

$notable protected_oe static_oe property

static public $checkItem_1_Rights = self::DONT_CHECK_ITEM_RIGHTS;
protected static $notable

$take_entity_1 public_oe static_oe property

public static $take_entity_1

$take_entity_2 public_oe static_oe property

public static $take_entity_2