Property | Type | Description | |
---|---|---|---|
$directgroup_itemtype | |||
$palette_bg | |||
$palette_ev | |||
$palette_fg | |||
$rightname |
Method | Description | |
---|---|---|
canView ( ) | ||
checkAlreadyPlanned ( $users_id, $begin, $end, $except = [] ) | Check already planned user for a period | |
checkAvailability ( $params = [] ) : Nothing | Show the availability of a user | |
colorFilter ( $options = [] ) : nothing | change color for selected line of $_SESSION['glpi_plannings'] | |
constructEventsArray ( array $options = [] ) : array | Prepare a set of events for jquery fullcalendar. | |
constructEventsArraySingleLine ( $actor, $params = [], &$raw_events = [] ) : nothing | construct a single line for self::constructEventsArray() Recursively called to construct $raw_events param. | |
defineTabs ( $options = [] ) | ||
deleteFilter ( $options = [] ) : nothing | delete selected line in $_SESSION['glpi_plannings'] | |
displayPlanningItem ( array $val, $who, $type = "", $complete ) : Nothing | Display a Planning Item | |
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) | ||
dropdownState ( $name, $value = '', $display = true ) | Dropdown of planning state | |
editEventForm ( $params = [] ) | ||
generateIcal ( $who, $who_group, $limititemtype = '' ) : icalendar | Generate ical file content | |
getMenuContent ( ) | ||
getMenuShorcut ( ) | ||
getPalette ( string $palette_name = 'bg' ) : mixed | Return a palette array (for example self::$palette_bg) | |
getPaletteColor ( string $palette_name = 'bg', integer $color_index ) : mixed | Return an hexa color from a palette | |
getRights ( $interface = 'central' ) | ||
getState ( $value ) | Get planning state name | |
getTabNameForItem ( CommonGLPI $item, $withtemplate ) | ||
getTypeName ( $nb ) | ||
initSessionForCurrentUser ( ) : Nothing | Init $_SESSION['glpi_plannings'] var with thses keys : - 'filters' : type of planning available (ChangeTask, Reminder, etc) - 'plannings' : all plannings definided for current user. | |
savePlanningsInDB ( ) | ||
sendAddGroupForm ( $params = [] ) | Recieve 'Group' data from self::showAddGroupForm and save them to session and DB | |
sendAddGroupUsersForm ( $params = [] ) | Recieve 'All users of a group' data from self::showAddGroupUsersForm and save them to session and DB | |
sendAddUserForm ( $params = [] ) | Recieve 'User' data from self::showAddPlanningForm and save them to session and DB | |
showAddEventClassicForm ( $params = [] ) | Former front/planning.php before 9.1. | |
showAddEventForm ( $params = [] ) | ||
showAddEventSubForm ( $params = [] ) : Nothing | Display form after selecting date range in planning | |
showAddGroupForm ( $params = [] ) : Nothing | Display 'Group' part of self::showAddPlanningForm spcified by planning type dropdown. | |
showAddGroupUsersForm ( ) : Nothing | Display 'All users of a group' part of self::showAddPlanningForm spcified by planning type dropdown. | |
showAddPlanningForm ( ) : Nothing | Display ajax form to add actor on planning | |
showAddUserForm ( ) : Nothing | Display 'User' part of self::showAddPlanningForm spcified by planning type dropdown. | |
showCentral ( $who ) : Nothing | Show the planning for the central page of a user | |
showPlanning ( $fullview = true ) : Nothing | Show the planning | |
showPlanningFilter ( ) : Nothing | Display left part of planning who contains filters and planning with delete/toggle buttons and color choosing. | |
showSingleLinePlanningFilter ( $filter_key, $filter_data, $options = [] ) : Nothing | Display a single line of planning filter. | |
toggleFilter ( $options = [] ) : nothing | toggle display for selected line of $_SESSION['glpi_plannings'] | |
updateEventTimes ( $params = [] ) : boolean | Change dates of a selected event. |
Method | Description | |
---|---|---|
displayUsingTwoDigits ( $time ) : string | Display an integer using 2 digits |
static public checkAlreadyPlanned ( $users_id, $begin, $end, $except = [] ) | ||
$users_id | user id | |
$begin | begin date | |
$end | end date | |
$except | array of items which not be into account array ('Reminder'=>array(1,2,id_of_items)) |
static public checkAvailability ( $params = [] ) : Nothing | ||
$params | array of params must contain : - begin: begin date to check (default '') - end: end date to check (default '') - itemtype : User or Object type (Ticket...) - foreign key field of the itemtype to define which item to used optional : - limitto : limit display to a specific user | |
return | Nothing | (display function) |
static public colorFilter ( $options = [] ) : nothing | ||
return | nothing |
static public constructEventsArray ( array $options = [] ) : array | ||
$options | array | with this keys: - begin: mandatory, planning start. (should be an ISO_8601 date, but could be anything wo can be parsed by strtotime) - end: mandatory, planning end. (should be an ISO_8601 date, but could be anything wo can be parsed by strtotime) - display_done_events: default true, show also events tagged as done |
return | array | $events : array with events in fullcalendar.io format |
static public constructEventsArraySingleLine ( $actor, $params = [], &$raw_events = [] ) : nothing | ||
return | nothing |
static public deleteFilter ( $options = [] ) : nothing | ||
return | nothing |
static public displayPlanningItem ( array $val, $who, $type = "", $complete ) : Nothing | ||
$val | array | Array of the item to display |
$who | ID of the user (0 if all) | |
$type | position of the item in the time block (in, through, begin or end) (default '') | |
$complete | complete display (more details) (default 0) | |
return | Nothing | (display function) |
static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) | ||
$item | CommonGLPI |
static public dropdownState ( $name, $value = '', $display = true ) | ||
$name | select name | |
$value | default value (default '') | |
$display | display of send string ? (true by default) |
static public generateIcal ( $who, $who_group, $limititemtype = '' ) : icalendar | ||
$who | user ID | |
$who_group | group ID | |
$limititemtype | itemtype only display this itemtype (default '') | |
return | icalendar | string |
static public getPalette ( string $palette_name = 'bg' ) : mixed | ||
$palette_name | string | the short name for palette (bg, fg, ev) |
return | mixed | the palette array or false |
static public getState ( $value ) | ||
$value | status ID |
public getTabNameForItem ( CommonGLPI $item, $withtemplate ) | ||
$item | CommonGLPI |
static public initSessionForCurrentUser ( ) : Nothing | ||
return | Nothing | (display function) |
static public sendAddGroupForm ( $params = [] ) | ||
$params | (array) : must contais form data (typically $_REQUEST) |
static public sendAddGroupUsersForm ( $params = [] ) | ||
$params | (array) : must contais form data (typically $_REQUEST) |
static public sendAddUserForm ( $params = [] ) | ||
$params | (array) : must contais form data (typically $_REQUEST) |
static public showAddEventClassicForm ( $params = [] ) | ||
$params | (array): array of parameters whou should contain : - id (integer): id of item who receive the planification - itemtype (string): itemtype of item who receive the planification - begin (string) : start date of event - end (optionnal) (string) : end date of event. Ifg missing, it will computerd from begin+1hour - rand_user (integer) : users_id to check planning avaibility |
static public showAddEventSubForm ( $params = [] ) : Nothing | ||
$params | (array): must contains this keys : - begin : start of selection range. (should be an ISO_8601 date, but could be anything wo can be parsed by strtotime) - end : end of selection range. (should be an ISO_8601 date, but could be anything wo can be parsed by strtotime) | |
return | Nothing | (display function) |
static public showAddGroupForm ( $params = [] ) : Nothing | ||
return | Nothing | (display function) |
static public showAddGroupUsersForm ( ) : Nothing | ||
return | Nothing | (display function) |
static public showAddPlanningForm ( ) : Nothing | ||
return | Nothing | (display function) |
static public showAddUserForm ( ) : Nothing | ||
return | Nothing | (display function) |
static public showCentral ( $who ) : Nothing | ||
$who | ID of the user | |
return | Nothing | (display function) |
static public showPlanning ( $fullview = true ) : Nothing | ||
return | Nothing | (display function) |
static public showPlanningFilter ( ) : Nothing | ||
return | Nothing | (display function) |
static public showSingleLinePlanningFilter ( $filter_key, $filter_data, $options = [] ) : Nothing | ||
$filter_key | : identify curent line of filter | |
$filter_data | : array of filter date, must contains : * 'show_delete' (boolean): show delete button * 'filter_color_index' (integer): index of the color to use in self::$palette_bg | |
$options | ||
return | Nothing | (display function) |
static public toggleFilter ( $options = [] ) : nothing | ||
return | nothing |
static public updateEventTimes ( $params = [] ) : boolean | ||
return | boolean |