PHP Class Calendar, glpi

Inheritance: extends TextBox
ファイルを表示 Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$can_be_translated
$dohistory From CommonDBTM
$rightname

Protected Properties

Property Type Description
$forward_entity_to

Public Methods

Method Description
cleanDBonPurge ( )
computeEndDate ( $start, $delay, $additional_delay, $work_in_days = false, $end_of_working_day = false ) : end Add a delay to a date using the active calendar
defineTabs ( $options = [] )
duplicate ( $options = [] ) Clone a calendar to another entity : name is updated
getActiveTimeBetween ( $start, $end, $work_in_days = false ) : timestamp Get active time between to date time for the active calendar
getDayNumberInWeek ( $date ) Get day number (in week) for a date
getDaysDurations ( ) : end Get days durations including all segments of the current calendar
getDurationsCache ( ) : end Get days durations including all segments of the current calendar
getForbiddenStandardMassiveAction ( )
getSpecificMassiveActions ( $checkitem = NULL )
getTypeName ( $nb )
isAWorkingDay ( $time ) : boolean Is the time passed is in a working day
isAWorkingHour ( $time ) : boolean Is the time passed is in a working hour
isHoliday ( $date ) : boolean is an holiday day ?
processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
showMassiveActionsSubForm ( MassiveAction $ma )
updateDurationCache ( $calendars_id ) Update the calendar cache

Method Details

cleanDBonPurge() public method

public cleanDBonPurge ( )

computeEndDate() public method

if delay >= DAY_TIMESTAMP : work in days else work in minutes
public computeEndDate ( $start, $delay, $additional_delay, $work_in_days = false, $end_of_working_day = false ) : end
$start datetime begin
$delay timestamp delay to add
$additional_delay timestamp delay to add (default 0)
$work_in_days boolean force working in days (false by default)
$end_of_working_day boolean end of working day (false by default)
return end date

defineTabs() public method

public defineTabs ( $options = [] )

duplicate() public method

Clone a calendar to another entity : name is updated
public duplicate ( $options = [] )
$options array of new values to set

getActiveTimeBetween() public method

Get active time between to date time for the active calendar
public getActiveTimeBetween ( $start, $end, $work_in_days = false ) : timestamp
$start datetime begin
$end datetime end
$work_in_days boolean force working in days (false by default)
return timestamp of delay

getDayNumberInWeek() static public method

Get day number (in week) for a date
static public getDayNumberInWeek ( $date )
$date date

getDaysDurations() public method

Get days durations including all segments of the current calendar
public getDaysDurations ( ) : end
return end date

getDurationsCache() public method

Get days durations including all segments of the current calendar
public getDurationsCache ( ) : end
return end date

getForbiddenStandardMassiveAction() public method

getSpecificMassiveActions() public method

See also: CommonDBTM::getSpecificMassiveActions()
public getSpecificMassiveActions ( $checkitem = NULL )

getTypeName() static public method

static public getTypeName ( $nb )

isAWorkingDay() public method

Is the time passed is in a working day
public isAWorkingDay ( $time ) : boolean
$time time time to check
return boolean

isAWorkingHour() public method

Is the time passed is in a working hour
public isAWorkingHour ( $time ) : boolean
$time time time to check
return boolean

isHoliday() public method

is an holiday day ?
public isHoliday ( $date ) : boolean
$date date of the day to check
return boolean

processMassiveActionsForOneItemtype() static public method

See also: CommonDBTM::processMassiveActionsForOneItemtype()
static public processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
$ma MassiveAction
$item CommonDBTM
$ids array

showMassiveActionsSubForm() static public method

See also: CommonDBTM::showMassiveActionsSubForm()
static public showMassiveActionsSubForm ( MassiveAction $ma )
$ma MassiveAction

updateDurationCache() public method

Update the calendar cache
public updateDurationCache ( $calendars_id )
$calendars_id integer calendar ID

Property Details

$can_be_translated public_oe property

public $can_be_translated

$dohistory public_oe property

From CommonDBTM
public $dohistory

$forward_entity_to protected_oe static_oe property

protected static $forward_entity_to

$rightname static_oe public_oe property

static public $rightname