PHP Класс Item_Ticket, glpi

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

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

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

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

Метод Описание
addMessageOnAddAction ( ) Add a message on add action
addMessageOnPurgeAction ( ) Add a message on delete action
canCreateItem ( )
countForItem ( CommonDBTM $item )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
dropdown ( $options = [] ) Make a select box with all glpi items
dropdownAllDevices ( $myname, $itemtype, $items_id, $admin, $users_id, $entity_restrict, $options = [] ) : nothing Make a select box for Tracking All Devices
dropdownMyDevices ( $userID, $entity_restrict, $itemtype, $items_id, $options = [] ) : nothing Make a select box for Ticket my devices
getForbiddenStandardMassiveAction ( )
getSearchOptions ( )
getSpecificValueToDisplay ( $field, $values, array $options = [] )
getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) : string
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getUsedItems ( type $tickets_id ) : type Return used items for a ticket
itemAddForm ( Ticket $ticket, $options = [] ) : Nothing Print the HTML ajax associated item add
post_addItem ( )
post_purgeItem ( )
prepareInputForAdd ( $input )
processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
showForTicket ( Ticket $ticket ) : Nothing Print the HTML array for Items linked to a ticket
showFormMassiveAction ( $ma ) Form for Followup on Massive action
showItemToAdd ( $tickets_id, $itemtype, $items_id, $options )
showMassiveActionsSubForm ( MassiveAction $ma )

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

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

Add a message on add action

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

Add a message on delete action

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

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

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

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

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

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

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

Make a select box with all glpi items
static public dropdown ( $options = [] )
$options array of possible options: - name : string / name of the select (default is users_id) - value - comments : boolean / is the comments displayed near the dropdown (default true) - entity : integer or array / restrict to a defined entity or array of entities (default -1 : no restriction) - entity_sons : boolean / if entity restrict specified auto select its sons only available if entity is a single value not an array(default false) - rand : integer / already computed rand value - toupdate : array / Update a specific item on select change on dropdown (need value_fieldname, to_update, url (see Ajax::updateItemOnSelectEvent for information) and may have moreparams) - used : array / Already used items ID: not to display in dropdown (default empty) - on_change : string / value to transmit to "onChange" - display : boolean / display or get string (default true) - width : specific width needed (default 80%)

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

Make a select box for Tracking All Devices
static public dropdownAllDevices ( $myname, $itemtype, $items_id, $admin, $users_id, $entity_restrict, $options = [] ) : nothing
$myname select name
$itemtype preselected value.for item type
$items_id preselected value for item ID (default 0)
$admin is an admin access ? (default 0)
$users_id user ID used to display my devices (default 0
$entity_restrict Restrict to a defined entity (default -1)
$options array of possible options: - tickets_id : ID of the ticket - used : ID of the requester user - multiple : allow multiple choice - rand : random number
Результат nothing (print out an HTML select box)

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

Make a select box for Ticket my devices
static public dropdownMyDevices ( $userID, $entity_restrict, $itemtype, $items_id, $options = [] ) : nothing
$userID User ID for my device section (default 0)
$entity_restrict restrict to a specific entity (default -1)
$itemtype of selected item (default 0)
$items_id of selected item (default 0)
$options array of possible options: - used : ID of the requester user - multiple : allow multiple choice
Результат nothing (print out an HTML select box)

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

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

public getSearchOptions ( )

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

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

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

static public getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) : string
$field
$name (default '')
$values (default '')
$options array array
Результат string

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

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

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

Return used items for a ticket
static public getUsedItems ( type $tickets_id ) : type
$tickets_id type
Результат type

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

Print the HTML ajax associated item add
static public itemAddForm ( Ticket $ticket, $options = [] ) : Nothing
$ticket Ticket Ticket object
$options array of possible options: - id : ID of the ticket - _users_id_requester : ID of the requester user - items_id : array of elements (itemtype => array(id1, id2, id3, ...))
Результат Nothing (display)

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

public post_addItem ( )

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

public post_purgeItem ( )

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

См. также: CommonDBTM::prepareInputForAdd()
public prepareInputForAdd ( $input )

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

См. также: CommonDBTM::processMassiveActionsForOneItemtype()
static public processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
$ma MassiveAction
$item CommonDBTM
$ids array

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

Print the HTML array for Items linked to a ticket
static public showForTicket ( Ticket $ticket ) : Nothing
$ticket Ticket Ticket object
Результат Nothing (display)

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

Form for Followup on Massive action
static public showFormMassiveAction ( $ma )

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

static public showItemToAdd ( $tickets_id, $itemtype, $items_id, $options )

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

См. также: CommonDBTM::showMassiveActionsSubForm()
static public showMassiveActionsSubForm ( MassiveAction $ma )
$ma MassiveAction

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

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

public static $checkItem_2_Rights

$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