PHP Класс Contract_Item, glpi

Relation between Contracts and Items
Наследование: extends CommonDBRelation
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$items_id_1
$items_id_2
$itemtype_1 From CommonDBRelation
$itemtype_2

Открытые методы

Метод Описание
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

Описание методов

canCreateItem() публичный Метод

Don't create a Contract_Item on contract that is alreay max used Was previously done (until 0.83.*) by Contract_Item::can()
См. также: CommonDBRelation::canCreateItem()
public canCreateItem ( )

cloneItem() статический публичный Метод

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 countForContract ( Contract $item )
$item Contract Contract object

countForItem() статический публичный Метод

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

displayTabContentForItem() статический публичный Метод

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

getForbiddenStandardMassiveAction() публичный Метод

getItemsForContract() статический публичный Метод

static public getItemsForContract ( $contract_id, $entities_id ) : array
$contract_id contract ID
$entities_id entity ID
Результат array of items linked to contracts

getRelationMassiveActionsSpecificities() статический публичный Метод

См. также: CommonDBRelation::getRelationMassiveActionsSpecificities()

getSearchOptions() публичный Метод

public getSearchOptions ( )

getSpecificValueToDisplay() статический публичный Метод

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

getSpecificValueToSelect() статический публичный Метод

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

getTabNameForItem() публичный Метод

См. также: CommonGLPI::getTabNameForItem()
public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTypeName() статический публичный Метод

static public getTypeName ( $nb )

showForContract() статический публичный Метод

Print the HTML array for Items linked to current contract
static public showForContract ( Contract $contract ) : Nothing
$contract Contract Contract object
Результат Nothing (display)

showForItem() статический публичный Метод

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 '')
Результат Nothing (display)

Описание свойств

$items_id_1 публичное статическое свойство

public static $items_id_1

$items_id_2 публичное статическое свойство

public static $items_id_2

$itemtype_1 публичное статическое свойство

From CommonDBRelation
public static $itemtype_1

$itemtype_2 публичное статическое свойство

public static $itemtype_2