PHP Class Item_Ticket, glpi

Relation between Tickets and Items
Inheritance: extends CommonDBRelation
Show file Open project: glpi-project/glpi Class Usage Examples

Public Properties

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

Public Methods

Method Description
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 )

Method Details

addMessageOnAddAction() public method

Add a message on add action

addMessageOnPurgeAction() public method

Add a message on delete action

canCreateItem() public method

See also: CommonDBRelation::canCreateItem()
public canCreateItem ( )

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

dropdown() static public method

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() static public method

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
return nothing (print out an HTML select box)

dropdownMyDevices() static public method

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
return nothing (print out an HTML select box)

getForbiddenStandardMassiveAction() public method

getSearchOptions() public method

public getSearchOptions ( )

getSpecificValueToDisplay() static public method

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

getSpecificValueToSelect() static public method

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

getTabNameForItem() public method

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

getUsedItems() static public method

Return used items for a ticket
static public getUsedItems ( type $tickets_id ) : type
$tickets_id type
return type

itemAddForm() static public method

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, ...))
return Nothing (display)

post_addItem() public method

public post_addItem ( )

post_purgeItem() public method

public post_purgeItem ( )

prepareInputForAdd() public method

See also: CommonDBTM::prepareInputForAdd()
public prepareInputForAdd ( $input )

processMassiveActionsForOneItemtype() static public method

See also: CommonDBTM::processMassiveActionsForOneItemtype()
static public processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
$ma MassiveAction
$item CommonDBTM
$ids array

showForTicket() static public method

Print the HTML array for Items linked to a ticket
static public showForTicket ( Ticket $ticket ) : Nothing
$ticket Ticket Ticket object
return Nothing (display)

showFormMassiveAction() static public method

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

showItemToAdd() static public method

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

showMassiveActionsSubForm() static public method

See also: CommonDBTM::showMassiveActionsSubForm()
static public showMassiveActionsSubForm ( MassiveAction $ma )
$ma MassiveAction

Property Details

$checkItem_2_Rights public static property

public static $checkItem_2_Rights

$items_id_1 public static property

public static $items_id_1

$items_id_2 public static property

public static $items_id_2

$itemtype_1 public static property

From CommonDBRelation
public static $itemtype_1

$itemtype_2 public static property

public static $itemtype_2