PHP 클래스 Ticket, glpi

저자: kspooner
상속: extends AppModel
파일 보기 프로젝트 열기: glpi-project/glpi 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$computerfound Is a hardware found in getHardwareData / getFromDBwithData : hardware link to the job
$dohistory From CommonDBTM
$grouplinkclass
$hardwaredatas Hardware datas used by getFromDBwithData
$rightname
$supplierlinkclass
$userlinkclass From CommonITIL

보호된 프로퍼티들

프로퍼티 타입 설명
$forward_entity_to
$userentity_oncreate

공개 메소드들

메소드 설명
addImagePaste ( ) : nothing Add image pasted to GLPI doc after ADD and before UPDATE of the item in the database
canAddFollowups ( ) : boolean Is the current user have right to add followups to the current ticket ?
canAddItem ( $type ) : rights Overloaded from commonDBTM
canAdminActors ( )
canApprove ( ) : boolean Is the current user have right to approve solution of the current ticket ?
canAssign ( )
canAssignToMe ( )
canCreateItem ( ) : boolean Is the current user have right to create the current ticket ?
canDelete ( )
canDeleteItem ( ) : boolean Is the current user have right to delete the current ticket ?
canMassiveAction ( $action, $field, $value )
canSolve ( ) : boolean Is the current user have right to solve the current ticket ?
canUpdate ( )
canUpdateItem ( ) : boolean Is the current user have right to update the current ticket ?
canView ( )
canViewItem ( ) : boolean Is the current user have right to show the current ticket ?
cleanDBonPurge ( )
cleanTagOrImage ( $content, $tags ) : htlm Delete tag or image from ticket content
computeTakeIntoAccountDelayStat ( ) Compute take into account stat of the current ticket
computeTco ( CommonDBTM $item ) : float Calculate Ticket TCO for an item
convertContentForNotification ( $content, $item ) : htlm Convert img or tag of ticket for notification mails
convertContentForTicket ( $content_html, $files, $tags ) : htlm Convert img of the collector for ticket
convertImageToTag ( $content_html, $force_update = false ) : htlm Convert image to tag
convertTagToImage ( $content_text, $force_update = false, $doc_data = [] ) : nothing Convert tag to image
countActiveTicketsForItem ( $itemtype, $items_id ) : integer Count active tickets for an hardware
countSolvedTicketsForItemLastDays ( $itemtype, $items_id, $days ) : integer Count solved tickets for an hardware last X days
cronAlertNotClosed ( $task ) : integer Cron for alert old tickets which are not solved
cronCloseTicket ( $task ) : integer Cron for ticket's automatic close
cronCreateInquest ( $task ) : integer Cron for ticketsatisfaction's automatic generated
cronInfo ( $name ) : arrray Give cron information
defineTabs ( $options = [] )
deleteSLT ( $id, $type, $delete_date ) : type Delete SLT for the ticket
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
dropdownType ( $name, $options = [] ) : string Dropdown of ticket type
filterTimeline ( )
getActiveOrSolvedLastDaysTicketsForItem ( $itemtype, $items_id, $days ) : integer Get active or solved tickets for an hardware last X days
getAdditionalDatas ( ) : nothing Retrieve data of the hardware linked to the ticket if exists
getAdditionalMenuContent ( )
getAdditionalMenuLinks ( )
getAdditionalMenuOptions ( )
getAllStatusArray ( $withmetaforsearch = false ) : an get the Ticket status list
getCalendar ( ) Get correct Calendar: Entity or Sla
getClosedStatusArray ( ) : an Get the ITIL object closed status list
getCommonLeftJoin ( )
getCommonSelect ( )
getDatasToAddSLT ( $slts_id, $entities_id, $date, $type ) : array Get Datas to be added for SLT add
getDefaultActor ( $type )
getDefaultActorRightSearch ( $type )
getDefaultSearchRequest ( ) Get default values to search engine to override
getDefaultValues ( $entity )
getForbiddenStandardMassiveAction ( )
getMenuShorcut ( )
getNewStatusArray ( ) : an Get the ITIL object new status list
getProcessStatusArray ( ) : an Get the ITIL object assign or plan status list
getReopenableStatusArray ( ) : an Get the ITIL object closed, solved or waiting status list
getRights ( $interface = 'central' )
getSearchOptions ( )
getSolvedStatusArray ( ) : an Get the ITIL object solved status list
getSpecificMassiveActions ( $checkitem = NULL )
getSpecificValueToDisplay ( $field, $values, array $options = [] )
getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) : string
getSplittedSubmitButtonHtml ( $tickets_id, $action = "add" )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTicketActors ( )
getTicketTemplateToUse ( $force_template, $type, $itilcategories_id, $entities_id ) : ticket Get ticket template to use Use force_template first, then try on template define for type and category then use default template of active profile of connected user and then use default entity one
getTicketTypeName ( $value ) Get ticket type Name
getTimelineItems ( )
getTypeName ( $nb ) Name of the type
getTypes ( ) : array Get ticket types
getValueToSelect ( $field_id_or_search_options, $name = '', $values = '', $options = [] ) Select a field using standard system
manageSltLevel ( $slts_id ) Manage SLT level escalation
manageValidationAdd ( $input ) : nothing Manage Validation add from input
numberOfFollowups ( $with_private = 1 ) : followup Number of followups of the ticket
numberOfTasks ( $with_private = 1 ) : followup Number of tasks of the ticket
post_addItem ( )
post_updateItem ( $history = 1 )
pre_deleteItem ( )
pre_updateInDB ( )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
setRichTextContent ( $name, $content, $rand ) Convert simple text content to rich text content, init html editor
setSimpleTextContent ( $content ) Convert rich text content to simple text content
showCentralCount ( $foruser = false ) Get tickets count
showCentralList ( $start, $status = "process", $showgrouptickets = true )
showCentralNewList ( )
showDebug ( ) Display debug information for current object
showDocumentAddButton ( $size = 25 )
showForm ( $ID, $options = [] )
showFormHelpdesk ( $ID, $ticket_template = false ) : nothing Print the helpdesk form
showFormHelpdeskObserver ( $options = [] ) Display a single oberver selector
showListForItem ( CommonDBTM $item ) : nothing Display tickets for an item
showPreviewAssignAction ( $output )
showSubForm ( CommonDBTM $item, $id, $params )
showTimeline ( $rand )
showTimelineForm ( $rand )
showTimelineHeader ( )
showVeryShort ( $ID, $forcetab = '' )
sltAffect ( $type, &$input, $manual_slts_id ) SLT affect by rules : reset due_date and time_to_own Manual SLT defined : reset due date and time_to_own No manual SLT and due date defined : reset auto SLT
updateDateMod ( $ID, $no_stat_computation = false, $users_id_lastupdater ) Update date mod of the ticket

메소드 상세

addImagePaste() 공개 메소드

Add image pasted to GLPI doc after ADD and before UPDATE of the item in the database
public addImagePaste ( ) : nothing
리턴 nothing

canAddFollowups() 공개 메소드

Is the current user have right to add followups to the current ticket ?
public canAddFollowups ( ) : boolean
리턴 boolean

canAddItem() 공개 메소드

Overloaded from commonDBTM
public canAddItem ( $type ) : rights
$type itemtype of object to add
리턴 rights

canAdminActors() 공개 메소드

public canAdminActors ( )

canApprove() 공개 메소드

Is the current user have right to approve solution of the current ticket ?
public canApprove ( ) : boolean
리턴 boolean

canAssign() 공개 메소드

public canAssign ( )

canAssignToMe() 공개 메소드

public canAssignToMe ( )

canCreateItem() 공개 메소드

Is the current user have right to create the current ticket ?
public canCreateItem ( ) : boolean
리턴 boolean

canDelete() 정적인 공개 메소드

static public canDelete ( )

canDeleteItem() 공개 메소드

Is the current user have right to delete the current ticket ?
public canDeleteItem ( ) : boolean
리턴 boolean

canMassiveAction() 공개 메소드

또한 보기: CommonDBTM::canMassiveAction()
public canMassiveAction ( $action, $field, $value )

canSolve() 공개 메소드

Is the current user have right to solve the current ticket ?
public canSolve ( ) : boolean
리턴 boolean

canUpdate() 정적인 공개 메소드

static public canUpdate ( )

canUpdateItem() 공개 메소드

Is the current user have right to update the current ticket ?
public canUpdateItem ( ) : boolean
리턴 boolean

canView() 정적인 공개 메소드

static public canView ( )

canViewItem() 공개 메소드

Is the current user have right to show the current ticket ?
public canViewItem ( ) : boolean
리턴 boolean

cleanDBonPurge() 공개 메소드

public cleanDBonPurge ( )

cleanTagOrImage() 공개 메소드

Delete tag or image from ticket content
public cleanTagOrImage ( $content, $tags ) : htlm
$content html content of input
$tags
리턴 htlm content

computeTakeIntoAccountDelayStat() 공개 메소드

Compute take into account stat of the current ticket

computeTco() 정적인 공개 메소드

Calculate Ticket TCO for an item
static public computeTco ( CommonDBTM $item ) : float
$item CommonDBTM CommonDBTM object of the item
리턴 float

convertContentForNotification() 공개 메소드

Convert img or tag of ticket for notification mails
public convertContentForNotification ( $content, $item ) : htlm
$content : html content of input
$item : item to store filenames and tags found for each image in $content
리턴 htlm content

convertContentForTicket() 정적인 공개 메소드

Convert img of the collector for ticket
static public convertContentForTicket ( $content_html, $files, $tags ) : htlm
$content_html html content of input
$files array of filename
$tags array of image tag
리턴 htlm content

convertImageToTag() 공개 메소드

Convert image to tag
public convertImageToTag ( $content_html, $force_update = false ) : htlm
$content_html html content of input
$force_update force update of content in item (false by default
리턴 htlm content

convertTagToImage() 공개 메소드

Convert tag to image
public convertTagToImage ( $content_text, $force_update = false, $doc_data = [] ) : nothing
$content_text text content of input
$force_update force update of content in item (false by default
$doc_data array of filenames and tags
리턴 nothing

countActiveTicketsForItem() 공개 메소드

Count active tickets for an hardware
public countActiveTicketsForItem ( $itemtype, $items_id ) : integer
$itemtype string Item type
$items_id integer ID of the Item
리턴 integer

countSolvedTicketsForItemLastDays() 공개 메소드

Count solved tickets for an hardware last X days
public countSolvedTicketsForItemLastDays ( $itemtype, $items_id, $days ) : integer
$itemtype string Item type
$items_id integer ID of the Item
$days integer day number
리턴 integer

cronAlertNotClosed() 정적인 공개 메소드

Cron for alert old tickets which are not solved
static public cronAlertNotClosed ( $task ) : integer
$task : crontask object
리턴 integer (0 : nothing done - 1 : done)

cronCloseTicket() 정적인 공개 메소드

Cron for ticket's automatic close
static public cronCloseTicket ( $task ) : integer
$task : crontask object
리턴 integer (0 : nothing done - 1 : done)

cronCreateInquest() 정적인 공개 메소드

Cron for ticketsatisfaction's automatic generated
static public cronCreateInquest ( $task ) : integer
$task : crontask object
리턴 integer (0 : nothing done - 1 : done)

cronInfo() 정적인 공개 메소드

Give cron information
static public cronInfo ( $name ) : arrray
$name : task's name
리턴 arrray of information

defineTabs() 공개 메소드

public defineTabs ( $options = [] )

deleteSLT() 공개 메소드

Delete SLT for the ticket
public deleteSLT ( $id, $type, $delete_date ) : type
$id
$type
$delete_date (default 0)
리턴 type

displayTabContentForItem() 정적인 공개 메소드

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

dropdownType() 정적인 공개 메소드

Dropdown of ticket type
static public dropdownType ( $name, $options = [] ) : string
$name select name
$options array of options: - value : integer / preselected value (default 0) - toadd : array / array of specific values to add at the begining - on_change : string / value to transmit to "onChange" - display : boolean / display or get string (default true)
리턴 string id of the select

filterTimeline() 공개 메소드

public filterTimeline ( )

getActiveOrSolvedLastDaysTicketsForItem() 공개 메소드

Get active or solved tickets for an hardware last X days
public getActiveOrSolvedLastDaysTicketsForItem ( $itemtype, $items_id, $days ) : integer
$itemtype string Item type
$items_id integer ID of the Item
$days integer day number
리턴 integer

getAdditionalDatas() 공개 메소드

Retrieve data of the hardware linked to the ticket if exists
public getAdditionalDatas ( ) : nothing
리턴 nothing : set computerfound to 1 if founded

getAdditionalMenuContent() 정적인 공개 메소드

또한 보기: CommonGLPI::getAdditionalMenuContent()
static public getAdditionalMenuContent ( )

getAdditionalMenuOptions() 정적인 공개 메소드

또한 보기: CommonGLPI::getAdditionalMenuOptions()
static public getAdditionalMenuOptions ( )

getAllStatusArray() 정적인 공개 메소드

get the Ticket status list
static public getAllStatusArray ( $withmetaforsearch = false ) : an
$withmetaforsearch boolean (false by default)
리턴 an array

getCalendar() 공개 메소드

Get correct Calendar: Entity or Sla
부터: 0.90.4
public getCalendar ( )

getClosedStatusArray() 정적인 공개 메소드

Get the ITIL object closed status list
static public getClosedStatusArray ( ) : an
리턴 an array

getCommonLeftJoin() 정적인 공개 메소드

static public getCommonLeftJoin ( )

getCommonSelect() 정적인 공개 메소드

static public getCommonSelect ( )

getDatasToAddSLT() 공개 메소드

Get Datas to be added for SLT add
public getDatasToAddSLT ( $slts_id, $entities_id, $date, $type ) : array
$slts_id SLT id
$entities_id entity ID of the ticket
$date begin date of the ticket
$type type of SLT
리턴 array of datas to add in ticket

getDefaultActor() 공개 메소드

또한 보기: CommonITILObject::getDefaultActor()
public getDefaultActor ( $type )

getDefaultActorRightSearch() 공개 메소드

또한 보기: CommonITILObject::getDefaultActorRightSearch()
public getDefaultActorRightSearch ( $type )

getDefaultSearchRequest() 정적인 공개 메소드

Get default values to search engine to override
static public getDefaultSearchRequest ( )

getDefaultValues() 정적인 공개 메소드

static public getDefaultValues ( $entity )
$entity integer entities_id usefull is function called by cron (default 0)

getForbiddenStandardMassiveAction() 공개 메소드

getMenuShorcut() 정적인 공개 메소드

또한 보기: CommonGLPI::getMenuShorcut()
static public getMenuShorcut ( )

getNewStatusArray() 정적인 공개 메소드

Get the ITIL object new status list
static public getNewStatusArray ( ) : an
리턴 an array

getProcessStatusArray() 정적인 공개 메소드

Get the ITIL object assign or plan status list
static public getProcessStatusArray ( ) : an
리턴 an array

getReopenableStatusArray() 정적인 공개 메소드

Get the ITIL object closed, solved or waiting status list
static public getReopenableStatusArray ( ) : an
리턴 an array

getRights() 공개 메소드

또한 보기: commonDBTM::getRights()
public getRights ( $interface = 'central' )

getSearchOptions() 공개 메소드

public getSearchOptions ( )

getSolvedStatusArray() 정적인 공개 메소드

Get the ITIL object solved status list
static public getSolvedStatusArray ( ) : an
리턴 an array

getSpecificMassiveActions() 공개 메소드

또한 보기: CommonDBTM::getSpecificMassiveActions()
public getSpecificMassiveActions ( $checkitem = NULL )

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

getSplittedSubmitButtonHtml() 정적인 공개 메소드

static public getSplittedSubmitButtonHtml ( $tickets_id, $action = "add" )
$tickets_id
$action (default 'add')

getTabNameForItem() 공개 메소드

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

getTicketActors() 공개 메소드

public getTicketActors ( )

getTicketTemplateToUse() 공개 메소드

Get ticket template to use Use force_template first, then try on template define for type and category then use default template of active profile of connected user and then use default entity one
public getTicketTemplateToUse ( $force_template, $type, $itilcategories_id, $entities_id ) : ticket
$force_template integer tickettemplate_id to used (case of preview for example) (default 0)
$type integer type of the ticket (default 0)
$itilcategories_id integer ticket category (default 0)
$entities_id integer (default -1)
리턴 ticket template object

getTicketTypeName() 정적인 공개 메소드

Get ticket type Name
static public getTicketTypeName ( $value )
$value type ID

getTimelineItems() 공개 메소드

public getTimelineItems ( )

getTypeName() 정적인 공개 메소드

Name of the type
static public getTypeName ( $nb )
$nb : number of item in the type (default 0)

getTypes() 정적인 공개 메소드

Get ticket types
static public getTypes ( ) : array
리턴 array of types

getValueToSelect() 공개 메소드

Select a field using standard system
public getValueToSelect ( $field_id_or_search_options, $name = '', $values = '', $options = [] )

manageSltLevel() 공개 메소드

Manage SLT level escalation
public manageSltLevel ( $slts_id )
$slts_id

manageValidationAdd() 공개 메소드

Manage Validation add from input
public manageValidationAdd ( $input ) : nothing
$input array : input array
리턴 nothing

numberOfFollowups() 공개 메소드

Number of followups of the ticket
public numberOfFollowups ( $with_private = 1 ) : followup
$with_private boolean : true : all followups / false : only public ones (default 1)
리턴 followup count

numberOfTasks() 공개 메소드

Number of tasks of the ticket
public numberOfTasks ( $with_private = 1 ) : followup
$with_private boolean : true : all ticket / false : only public ones (default 1)
리턴 followup count

post_addItem() 공개 메소드

public post_addItem ( )

post_updateItem() 공개 메소드

public post_updateItem ( $history = 1 )

pre_deleteItem() 공개 메소드

public pre_deleteItem ( )

pre_updateInDB() 공개 메소드

public pre_updateInDB ( )

prepareInputForAdd() 공개 메소드

public prepareInputForAdd ( $input )

prepareInputForUpdate() 공개 메소드

public prepareInputForUpdate ( $input )

setRichTextContent() 공개 메소드

Convert simple text content to rich text content, init html editor
public setRichTextContent ( $name, $content, $rand )
$name name of textarea
$content content to convert in html
$rand

setSimpleTextContent() 공개 메소드

Convert rich text content to simple text content
public setSimpleTextContent ( $content )
$content : content to convert in html

showCentralCount() 정적인 공개 메소드

Get tickets count
static public showCentralCount ( $foruser = false )
$foruser boolean : only for current login user as requester (false by default)

showCentralList() 정적인 공개 메소드

static public showCentralList ( $start, $status = "process", $showgrouptickets = true )
$start
$status (default ''process)
$showgrouptickets (true by default)

showCentralNewList() 정적인 공개 메소드

static public showCentralNewList ( )

showDebug() 공개 메소드

Display debug information for current object
public showDebug ( )

showDocumentAddButton() 정적인 공개 메소드

static public showDocumentAddButton ( $size = 25 )
$size (default 25)

showForm() 공개 메소드

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

showFormHelpdesk() 공개 메소드

Print the helpdesk form
public showFormHelpdesk ( $ID, $ticket_template = false ) : nothing
$ID integer ID of the user who want to display the Helpdesk
$ticket_template boolean ticket template for preview : false if not used for preview (false by default)
리턴 nothing (print the helpdesk)

showFormHelpdeskObserver() 정적인 공개 메소드

* @param $options array options for default values ($options of showActorAddFormOnCreate)
static public showFormHelpdeskObserver ( $options = [] )

showListForItem() 정적인 공개 메소드

Will also display tickets of linked items
static public showListForItem ( CommonDBTM $item ) : nothing
$item CommonDBTM CommonDBTM object
리턴 nothing (display a table)

showPreviewAssignAction() 정적인 공개 메소드

static public showPreviewAssignAction ( $output )
$output

showSubForm() 정적인 공개 메소드

static public showSubForm ( CommonDBTM $item, $id, $params )
$item CommonDBTM
$id
$params

showTimeline() 공개 메소드

public showTimeline ( $rand )
$rand

showTimelineForm() 공개 메소드

public showTimelineForm ( $rand )
$rand

showTimelineHeader() 공개 메소드

public showTimelineHeader ( )

showVeryShort() 정적인 공개 메소드

static public showVeryShort ( $ID, $forcetab = '' )
$ID
$forcetab string name of the tab to force at the display (default '')

sltAffect() 공개 메소드

@since version 9.1
public sltAffect ( $type, &$input, $manual_slts_id )
$type
$input
$manual_slts_id

updateDateMod() 공개 메소드

Update date mod of the ticket
public updateDateMod ( $ID, $no_stat_computation = false, $users_id_lastupdater )
$ID ID of the ticket
$no_stat_computation boolean do not cumpute take into account stat (false by default)
$users_id_lastupdater integer to force last_update id (default 0 = not used)

프로퍼티 상세

$computerfound 공개적으로 프로퍼티

Is a hardware found in getHardwareData / getFromDBwithData : hardware link to the job
public $computerfound

$dohistory 공개적으로 프로퍼티

From CommonDBTM
public $dohistory

$forward_entity_to 보호되어 있는 정적으로 프로퍼티

protected static $forward_entity_to

$grouplinkclass 공개적으로 프로퍼티

public $grouplinkclass

$hardwaredatas 공개적으로 프로퍼티

Hardware datas used by getFromDBwithData
public $hardwaredatas

$rightname 정적으로 공개적으로 프로퍼티

static public $rightname

$supplierlinkclass 공개적으로 프로퍼티

public $supplierlinkclass

$userentity_oncreate 보호되어 있는 프로퍼티

protected $userentity_oncreate

$userlinkclass 공개적으로 프로퍼티

From CommonITIL
public $userlinkclass