Class SLA. More...

List of all members.

Public Member Functions

 setTicketCalendar ($calendars_id)
 Define calendar of the ticket using the SLA when using this calendar as sla-s calendar.
 defineTabs ($options=array())
 Define tabs to display.
 post_getEmpty ()
 Actions done at the end of the getEmpty function.
 cleanDBonPurge ()
 Actions done when item is deleted from the database.
 showForm ($ID, $options=array())
 Print the sla form.
 getSearchOptions ()
 Get the Search options for the given Type.
 computeDueDate ($start_date, $additional_delay=0)
 Get due date based on a sla.
 computeExecutionDate ($start_date, $slalevels_id, $additional_delay=0)
 Get execution date of a sla level.
 getActiveTimeBetween ($start, $end)
 Get active time between to date time for the active calendar.
 addLevelToDo (Ticket $ticket)
 Add a level to do for a ticket.

Static Public Member Functions

static getTypeName ($nb=0)
 Return the localized name of the current Type Should be overloaded in each new class.
static canCreate ()
 Have I the global right to "create" the Object May be overloaded if needed (ex KnowbaseItem)
static canView ()
 Have I the global right to "view" the Object.
static deleteLevelsToDo (Ticket $ticket)
 Add a level to do for a ticket.

Public Attributes

 $dohistory = true
 Make an history of the changes.

Static Protected Attributes

static $forward_entity_to = array('SLALevel')
 Forward entity datas to linked items.

Detailed Description

Class SLA.

Definition at line 39 of file sla.class.php.


Member Function Documentation

addLevelToDo ( Ticket ticket)

Add a level to do for a ticket.

Parameters:
$ticketTicket object
Returns:
execution date time (NULL if sla not exists)

Definition at line 353 of file sla.class.php.

References computeExecutionDate().

static canCreate ( ) [static]

Have I the global right to "create" the Object May be overloaded if needed (ex KnowbaseItem)

Returns:
booleen

Reimplemented from CommonDBTM.

Definition at line 53 of file sla.class.php.

References haveRight().

static canView ( ) [static]

Have I the global right to "view" the Object.

Default is true and check entity if the objet is entity assign

May be overloaded if needed

Returns:
booleen

Reimplemented from CommonDBTM.

Definition at line 58 of file sla.class.php.

References haveRight().

Actions done when item is deleted from the database.

Returns:
nothing

Reimplemented from CommonDBTM.

Definition at line 92 of file sla.class.php.

References $DB, $query, $result, $ticket, and Rule\cleanForItemAction().

computeDueDate ( start_date,
additional_delay = 0 
)

Get due date based on a sla.

Parameters:
$start_datedatetime start date
$additional_delayinteger additional delay to add or substract (for waiting time) (default 0)
Returns:
due date time (NULL if sla not exists)

Definition at line 246 of file sla.class.php.

computeExecutionDate ( start_date,
slalevels_id,
additional_delay = 0 
)

Get execution date of a sla level.

Parameters:
$start_datedatetime start date
$slalevels_idinteger sla level id
$additional_delayinteger additional delay to add or substract (for waiting time) (default 0)
Returns:
execution date time (NULL if sla not exists)

Definition at line 281 of file sla.class.php.

Referenced by addLevelToDo().

defineTabs ( options = array())

Define tabs to display.

NB : Only called for existing object

Parameters:
$optionsarray
  • withtemplate is a template view ?
Returns:
array containing the onglets

Reimplemented from CommonGLPI.

Definition at line 76 of file sla.class.php.

References $options, and CommonGLPI\addStandardTab().

static deleteLevelsToDo ( Ticket ticket) [static]

Add a level to do for a ticket.

Parameters:
$ticketTicket object
Returns:
execution date time (NULL if sla not exists)

Definition at line 375 of file sla.class.php.

References $DB, and $query.

Referenced by CommonITILObject\pre_updateInDB().

getActiveTimeBetween ( start,
end 
)

Get active time between to date time for the active calendar.

Parameters:
$startdatetime begin
$enddatetime end
Returns:
timestamp of delay

Definition at line 319 of file sla.class.php.

Get the Search options for the given Type.

This should be overloaded in Class

Returns:
an array of search options More information on https://forge.indepnet.net/wiki/glpi/SearchEngine

Reimplemented from CommonDBTM.

Definition at line 195 of file sla.class.php.

References __(), and CommonDBTM\getTable().

static getTypeName ( nb = 0) [static]

Return the localized name of the current Type Should be overloaded in each new class.

Returns:
string

Reimplemented from CommonGLPI.

Definition at line 47 of file sla.class.php.

References __().

Referenced by SlaLevel\showForSLA().

Actions done at the end of the getEmpty function.

Returns:
nothing

Reimplemented from CommonDBTM.

Definition at line 87 of file sla.class.php.

setTicketCalendar ( calendars_id)

Define calendar of the ticket using the SLA when using this calendar as sla-s calendar.

Parameters:
$calendars_idcalendars_id of the ticket

Definition at line 68 of file sla.class.php.

showForm ( ID,
options = array() 
)

Print the sla form.

Parameters:
$IDinteger ID of the item
$optionsarray of possible options:
  • target filename : where to go when done.
  • withtemplate boolean : template or basic item
Returns:
boolean item found

Definition at line 137 of file sla.class.php.

References $i, $options, __(), _n(), CommonGLPI\addDivForTabs(), Html\autocompletionTextField(), Html\convDateTime(), CommonDBTM\dropdown(), CommonDBTM\initForm(), CommonDBTM\showFormButtons(), CommonDBTM\showFormHeader(), Dropdown\showFromArray(), and CommonGLPI\showTabs().


Member Data Documentation

$dohistory = true

Make an history of the changes.

Reimplemented from CommonDBTM.

Definition at line 42 of file sla.class.php.

$forward_entity_to = array('SLALevel') [static, protected]

Forward entity datas to linked items.

Reimplemented from CommonDBTM.

Definition at line 44 of file sla.class.php.


The documentation for this class was generated from the following file: