PHP Класс SLT, glpi

Наследование: extends CommonDBChild
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$dohistory From CommonDBTM
$items_id
$itemtype From CommonDBChild
$rightname

Защищенные свойства (Protected)

Свойство Тип Описание
$forward_entity_to

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

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

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

addLevelToDo() публичный метод

Add a level to do for a ticket
public addLevelToDo ( Ticket $ticket, $slalevels_id ) : execution
$ticket Ticket Ticket object
$slalevels_id
Результат execution date time (NULL if sla not exists)

cleanDBonPurge() публичный метод

public cleanDBonPurge ( )

computeDate() публичный метод

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)
Результат due date time (NULL if sla not exists)

computeExecutionDate() публичный метод

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)
Результат execution date time (NULL if sla not exists)

defineTabs() публичный метод

public defineTabs ( $options = [] )

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

Add a level to do for a ticket
static public deleteLevelsToDo ( Ticket $ticket ) : execution
$ticket Ticket Ticket object
Результат execution date time (NULL if sla not exists)

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

static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) : boolean
$item CommonGLPI CommonGLPI item
$tabnum (default 1)
$withtemplate (default 0)
Результат boolean

getActiveTimeBetween() публичный метод

Get active time between to date time for the active calendar
public getActiveTimeBetween ( $start, $end ) : timestamp
$start datetime begin
$end datetime end
Результат timestamp of delay

getFromDB() публичный метод

См. также: CommonDBTM::getFromDB
public getFromDB ( $ID )

getSLTTime() публичный метод

Get computed resolution time
public getSLTTime ( ) : resolution
Результат resolution time

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

public getSearchOptions ( )

getSltData() публичный метод

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

getSltDataForTicket() публичный метод

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

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

Get SLT table fields
static public getSltFieldNames ( $type ) : array
$type
Результат array

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

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

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

Get SLT types name
static public getSltTypeName ( type $type ) : string
$type type
Результат string name

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

Get SLT types
static public getSltTypes ( ) : array
Результат array of types

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() публичный метод

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

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

Time to own
static public getTypeName ( $nb )

post_getEmpty() публичный метод

См. также: CommonDBTM::post_getEmpty()
public post_getEmpty ( )

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

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

prepareInputForUpdate() публичный метод

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

setTicketCalendar() публичный метод

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() статический публичный метод

Print the HTML array for SLTs linked to a SLA
static public showForSla ( SLA $sla ) : boolean
$sla SLA
Результат boolean

showForm() публичный метод

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
Результат boolean item found

showSltForTicket() публичный метод

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

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

$dohistory публичное свойство

From CommonDBTM
public $dohistory

$forward_entity_to защищенное статическое свойство

protected static $forward_entity_to

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

public static $items_id

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

From CommonDBChild
public static $itemtype

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

static public $rightname