PHP Класс Calendar, glpi

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

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

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

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

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

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

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

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

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

public cleanDBonPurge ( )

computeEndDate() публичный Метод

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)
Результат end date

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

public defineTabs ( $options = [] )

duplicate() публичный Метод

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

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

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)
Результат timestamp of delay

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

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

getDaysDurations() публичный Метод

Get days durations including all segments of the current calendar
public getDaysDurations ( ) : end
Результат end date

getDurationsCache() публичный Метод

Get days durations including all segments of the current calendar
public getDurationsCache ( ) : end
Результат end date

getForbiddenStandardMassiveAction() публичный Метод

getSpecificMassiveActions() публичный Метод

См. также: CommonDBTM::getSpecificMassiveActions()
public getSpecificMassiveActions ( $checkitem = NULL )

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

static public getTypeName ( $nb )

isAWorkingDay() публичный Метод

Is the time passed is in a working day
public isAWorkingDay ( $time ) : boolean
$time time time to check
Результат boolean

isAWorkingHour() публичный Метод

Is the time passed is in a working hour
public isAWorkingHour ( $time ) : boolean
$time time time to check
Результат boolean

isHoliday() публичный Метод

is an holiday day ?
public isHoliday ( $date ) : boolean
$date date of the day to check
Результат boolean

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

См. также: CommonDBTM::processMassiveActionsForOneItemtype()
static public processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids )
$ma MassiveAction
$item CommonDBTM
$ids array

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

См. также: CommonDBTM::showMassiveActionsSubForm()
static public showMassiveActionsSubForm ( MassiveAction $ma )
$ma MassiveAction

updateDurationCache() публичный Метод

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

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

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

public $can_be_translated

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

From CommonDBTM
public $dohistory

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

protected static $forward_entity_to

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

static public $rightname