PHP Class CalendarSegment, glpi

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

Public Properties

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

Public Methods

Method Description
addDelayInDay ( $calendars_id, $day, $begin_time, $delay ) : timestamp Add a delay of a starting hour in a specific day
cloneCalendar ( $oldid, $newid ) Duplicate all segments from a calendar to his clone
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getActiveTimeBetween ( $calendars_id, $day, $begin_time, $end_time ) : timestamp Get segments of a calendar between 2 date
getFirstWorkingHour ( $calendars_id, $day ) : time Get first working hour of a day
getForbiddenStandardMassiveAction ( )
getLastWorkingHour ( $calendars_id, $day ) : time Get last working hour of a day
getSegmentsBetween ( $calendars_id, $begin_day, $begin_time, $end_day, $end_time ) Get segments of a calendar between 2 date
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb )
isAWorkingHour ( $calendars_id, $day, $hour ) : boolean Is the hour passed is a working hour ?
post_addItem ( )
post_deleteFromDB ( )
prepareInputForAdd ( $input )
showForCalendar ( Calendar $calendar ) Show segments of a calendar

Method Details

addDelayInDay() static public method

Add a delay of a starting hour in a specific day
static public addDelayInDay ( $calendars_id, $day, $begin_time, $delay ) : timestamp
$calendars_id id of the calendar
$day day number
$begin_time begin time
$delay timestamp delay to add
return timestamp value

cloneCalendar() static public method

Duplicate all segments from a calendar to his clone
static public cloneCalendar ( $oldid, $newid )
$oldid
$newid

displayTabContentForItem() static public method

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

getActiveTimeBetween() static public method

Get segments of a calendar between 2 date
static public getActiveTimeBetween ( $calendars_id, $day, $begin_time, $end_time ) : timestamp
$calendars_id id of the calendar
$day day number
$begin_time begin time to check
$end_time end time to check
return timestamp value

getFirstWorkingHour() static public method

Get first working hour of a day
static public getFirstWorkingHour ( $calendars_id, $day ) : time
$calendars_id id of the calendar
$day day number
return time value

getForbiddenStandardMassiveAction() public method

getLastWorkingHour() static public method

Get last working hour of a day
static public getLastWorkingHour ( $calendars_id, $day ) : time
$calendars_id id of the calendar
$day day number
return time value

getSegmentsBetween() static public method

Get segments of a calendar between 2 date
static public getSegmentsBetween ( $calendars_id, $begin_day, $begin_time, $end_day, $end_time )
$calendars_id id of the calendar
$begin_day begin day number
$begin_time begin time to check
$end_day end day number
$end_time end time to check

getTabNameForItem() public method

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

getTypeName() static public method

static public getTypeName ( $nb )

isAWorkingHour() static public method

Is the hour passed is a working hour ?
static public isAWorkingHour ( $calendars_id, $day, $hour ) : boolean
$calendars_id id of the calendar
$day day number
$hour hour (Format HH:MM::SS)
return boolean

post_addItem() public method

public post_addItem ( )

post_deleteFromDB() public method

public post_deleteFromDB ( )

prepareInputForAdd() public method

public prepareInputForAdd ( $input )

showForCalendar() static public method

Show segments of a calendar
static public showForCalendar ( Calendar $calendar )
$calendar Calendar Calendar object

Property Details

$dohistory public property

From CommonDBTM
public $dohistory

$items_id public static property

public static $items_id

$itemtype public static property

From CommonDBChild
public static $itemtype