PHP Class Contract_Item, glpi

Relation between Contracts and Items
Inheritance: extends CommonDBRelation
Datei anzeigen Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$items_id_1
$items_id_2
$itemtype_1 From CommonDBRelation
$itemtype_2

Public Methods

Method Description
canCreateItem ( ) Don't create a Contract_Item on contract that is alreay max used Was previously done (until 0.83.*) by Contract_Item::can()
cloneItem ( $itemtype, $oldid, $newid, $newitemtype = '' ) Duplicate contracts from an item template to its clone
countForContract ( Contract $item )
countForItem ( CommonDBTM $item )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getForbiddenStandardMassiveAction ( )
getItemsForContract ( $contract_id, $entities_id ) : array
getRelationMassiveActionsSpecificities ( )
getSearchOptions ( )
getSpecificValueToDisplay ( $field, $values, array $options = [] )
getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb )
showForContract ( Contract $contract ) : Nothing Print the HTML array for Items linked to current contract
showForItem ( CommonDBTM $item, $withtemplate = '' ) : Nothing Print an HTML array of contract associated to an object

Method Details

canCreateItem() public method

Don't create a Contract_Item on contract that is alreay max used Was previously done (until 0.83.*) by Contract_Item::can()
See also: CommonDBRelation::canCreateItem()
public canCreateItem ( )

cloneItem() static public method

Duplicate contracts from an item template to its clone
static public cloneItem ( $itemtype, $oldid, $newid, $newitemtype = '' )
$itemtype itemtype of the item
$oldid ID of the item to clone
$newid ID of the item cloned
$newitemtype itemtype of the new item (= $itemtype if empty) (default '')

countForContract() static public method

static public countForContract ( Contract $item )
$item Contract Contract object

countForItem() static public method

static public countForItem ( CommonDBTM $item )
$item CommonDBTM CommonDBTM object

displayTabContentForItem() static public method

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

getForbiddenStandardMassiveAction() public method

getItemsForContract() static public method

static public getItemsForContract ( $contract_id, $entities_id ) : array
$contract_id contract ID
$entities_id entity ID
return array of items linked to contracts

getRelationMassiveActionsSpecificities() static public method

See also: CommonDBRelation::getRelationMassiveActionsSpecificities()

getSearchOptions() public method

public getSearchOptions ( )

getSpecificValueToDisplay() static public method

static public getSpecificValueToDisplay ( $field, $values, array $options = [] )
$options array

getSpecificValueToSelect() static public method

static public getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] )
$field
$name (default '')
$values (default '')
$options array array

getTabNameForItem() public method

See also: CommonGLPI::getTabNameForItem()
public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTypeName() static public method

static public getTypeName ( $nb )

showForContract() static public method

Print the HTML array for Items linked to current contract
static public showForContract ( Contract $contract ) : Nothing
$contract Contract Contract object
return Nothing (display)

showForItem() static public method

Print an HTML array of contract associated to an object
static public showForItem ( CommonDBTM $item, $withtemplate = '' ) : Nothing
$item CommonDBTM CommonDBTM object wanted
$withtemplate not used (to be deleted) (default '')
return Nothing (display)

Property Details

$items_id_1 public_oe static_oe property

public static $items_id_1

$items_id_2 public_oe static_oe property

public static $items_id_2

$itemtype_1 public_oe static_oe property

From CommonDBRelation
public static $itemtype_1

$itemtype_2 public_oe static_oe property

public static $itemtype_2