PHP Class SLT, glpi

Inheritance: extends CommonDBChild
Mostra file Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$dohistory From CommonDBTM
$items_id
$itemtype From CommonDBChild
$rightname

Protected Properties

Property Type Description
$forward_entity_to

Public Methods

Method Description
addLevelToDo ( Ticket $ticket, $slalevels_id ) : execution Add a level to do for a ticket
cleanDBonPurge ( )
computeDate ( $start_date, $additional_delay ) : due Get date based on a slt
computeExecutionDate ( $start_date, $slalevels_id, $additional_delay ) : execution Get execution date of a sla level
defineTabs ( $options = [] )
deleteLevelsToDo ( Ticket $ticket ) : execution Add a level to do for a ticket
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) : boolean
getActiveTimeBetween ( $start, $end ) : timestamp Get active time between to date time for the active calendar
getFromDB ( $ID )
getSLTTime ( ) : resolution Get computed resolution time
getSearchOptions ( )
getSltData ( $condition ) Get SLT datas by condition
getSltDataForTicket ( $tickets_id, $type ) Get SLT data by type and ticket
getSltFieldNames ( $type ) : array Get SLT table fields
getSltTypeDropdown ( $options ) Get SLT types dropdown
getSltTypeName ( type $type ) : string Get SLT types name
getSltTypes ( ) : array Get SLT types
getSpecificValueToDisplay ( $field, $values, array $options = [] )
getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) : string
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb ) Time to own
post_getEmpty ( )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
setTicketCalendar ( $calendars_id ) Define calendar of the ticket using the SLT when using this calendar as slt-s calendar
showForSla ( SLA $sla ) : boolean Print the HTML array for SLTs linked to a SLA
showForm ( $ID, $options = [] ) : boolean Print the sla form
showSltForTicket ( Ticket $ticket, $type, $tt, $canupdate ) Show SLT for ticket

Method Details

addLevelToDo() public method

Add a level to do for a ticket
public addLevelToDo ( Ticket $ticket, $slalevels_id ) : execution
$ticket Ticket Ticket object
$slalevels_id
return execution date time (NULL if sla not exists)

cleanDBonPurge() public method

public cleanDBonPurge ( )

computeDate() public method

Get date based on a slt
public computeDate ( $start_date, $additional_delay ) : due
$start_date datetime start date
$additional_delay integer additional delay to add or substract (for waiting time) (default 0)
return due date time (NULL if sla not exists)

computeExecutionDate() public method

Get execution date of a sla level
public computeExecutionDate ( $start_date, $slalevels_id, $additional_delay ) : execution
$start_date datetime start date
$slalevels_id integer sla level id
$additional_delay integer additional delay to add or substract (for waiting time) (default 0)
return execution date time (NULL if sla not exists)

defineTabs() public method

public defineTabs ( $options = [] )

deleteLevelsToDo() static public method

Add a level to do for a ticket
static public deleteLevelsToDo ( Ticket $ticket ) : execution
$ticket Ticket Ticket object
return execution date time (NULL if sla not exists)

displayTabContentForItem() static public method

static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) : boolean
$item CommonGLPI CommonGLPI item
$tabnum (default 1)
$withtemplate (default 0)
return boolean

getActiveTimeBetween() public method

Get active time between to date time for the active calendar
public getActiveTimeBetween ( $start, $end ) : timestamp
$start datetime begin
$end datetime end
return timestamp of delay

getFromDB() public method

See also: CommonDBTM::getFromDB
public getFromDB ( $ID )

getSLTTime() public method

Get computed resolution time
public getSLTTime ( ) : resolution
return resolution time

getSearchOptions() public method

public getSearchOptions ( )

getSltData() public method

Get SLT datas by condition
public getSltData ( $condition )
$condition

getSltDataForTicket() public method

Get SLT data by type and ticket
public getSltDataForTicket ( $tickets_id, $type )
$tickets_id
$type

getSltFieldNames() static public method

Get SLT table fields
static public getSltFieldNames ( $type ) : array
$type
return array

getSltTypeDropdown() static public method

Get SLT types dropdown
static public getSltTypeDropdown ( $options )
$options

getSltTypeName() static public method

Get SLT types name
static public getSltTypeName ( type $type ) : string
$type type
return string name

getSltTypes() static public method

Get SLT types
static public getSltTypes ( ) : array
return array of types

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

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

getTypeName() static public method

Time to own
static public getTypeName ( $nb )

post_getEmpty() public method

See also: CommonDBTM::post_getEmpty()
public post_getEmpty ( )

prepareInputForAdd() public method

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

prepareInputForUpdate() public method

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

setTicketCalendar() public method

Define calendar of the ticket using the SLT when using this calendar as slt-s calendar
public setTicketCalendar ( $calendars_id )
$calendars_id calendars_id of the ticket

showForSla() static public method

Print the HTML array for SLTs linked to a SLA
static public showForSla ( SLA $sla ) : boolean
$sla SLA
return boolean

showForm() public method

Print the sla form
public showForm ( $ID, $options = [] ) : boolean
$ID integer ID of the item
$options array of possible options: - target filename : where to go when done. - withtemplate boolean : template or basic item
return boolean item found

showSltForTicket() public method

Show SLT for ticket
public showSltForTicket ( Ticket $ticket, $type, $tt, $canupdate )
$ticket Ticket Ticket item
$type
$tt
$canupdate

Property Details

$dohistory public_oe property

From CommonDBTM
public $dohistory

$forward_entity_to protected_oe static_oe property

protected static $forward_entity_to

$items_id public_oe static_oe property

public static $items_id

$itemtype public_oe static_oe property

From CommonDBChild
public static $itemtype

$rightname static_oe public_oe property

static public $rightname