|
dolibarr 25.0.0-alpha
|
Set of function for the agenda module. More...
Go to the source code of this file.
Functions | |
| print_actions_filter ( $form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filtered, $pid, $socid, $action, $showextcals=array(), $actioncode='', $usergroupid=0, $excludetype='', $resourceid=0, $search_categ_cus=0, $search_import_key='') | |
| Show filter form in agenda view. | |
| show_array_actions_to_do ($max=5) | |
| Show actions to do array. | |
| show_array_last_actions_done ($max=5) | |
| Show last actions array. | |
| agenda_prepare_head () | |
| Prepare array with list of tabs. | |
| actions_prepare_head ($object) | |
| Prepare array with list of tabs. | |
| calendars_prepare_head ($param) | |
| Define head array for tabs of agenda setup pages. | |
| dol_color_minus ($color, $minus, $minusunit=16) | |
| Change color with a delta. | |
| agenda_build_eventarray ($db, $hookmanager, $user, &$object, &$action, $mode, $year, $month, $day, $firstdaytoshow, $lastdaytoshow, $filters, $sincedatec=null) | |
| Build $eventarray (list of ActionComm objects, indexed by day) for the agenda calendar views (month/week/day), applying the exact same date-range and filter logic the calendar page itself uses. | |
| agenda_get_birthday_events ($db, $langs, $user, $mode, $month, $day, $year, &$eventarray, &$nbevents) | |
| Complete an agenda calendar event array with contact birthday pseudo-events. | |
Set of function for the agenda module.
Definition in file agenda.lib.php.
| actions_prepare_head | ( | $object | ) |
Prepare array with list of tabs.
| object | $object | Object related to tabs |
Definition at line 456 of file agenda.lib.php.
References $conf, $db, $object, complete_head_from_modules(), Link\count(), dol_dir_list(), dolBuildUrl(), getDolGlobalString(), and isModEnabled().
| agenda_build_eventarray | ( | $db, | |
| $hookmanager, | |||
| $user, | |||
| & | $object, | ||
| & | $action, | ||
| $mode, | |||
| $year, | |||
| $month, | |||
| $day, | |||
| $firstdaytoshow, | |||
| $lastdaytoshow, | |||
| $filters, | |||
| $sincedatec = null ) |
Build $eventarray (list of ActionComm objects, indexed by day) for the agenda calendar views (month/week/day), applying the exact same date-range and filter logic the calendar page itself uses.
Extracted from htdocs/comm/action/index.php so the same logic can be shared by other agenda views.
| DoliDB | $db | Database handler |
| HookManager | $hookmanager | Hook manager |
| User | $user | Current user |
| null|CommonObject|array<int|string,mixed>|string | $object Object passed to hooks (may be modified by hooks) | |
| string | $action | Action string passed to hooks (may be modified by hooks) |
| string | $mode | View mode: 'show_day', 'show_week', 'show_month', or '' |
| int | $year | Year |
| int | $month | Month |
| int | $day | Day |
| int | $firstdaytoshow | Start of the visible date range (Unix timestamp) |
| int | $lastdaytoshow | End of the visible date range (Unix timestamp, exclusive) |
| array{usergroup:string,filtert:string,resourceid:int,actioncode:string|string[],pid:int,socid:int,type:string,status:string,search_categ_cus:int} | $filters Already-resolved filter values | |
| int | null | $sincedatec | If set, only return events created (datec) or modified (tms) after this Unix timestamp; null = no restriction (identical to today's behavior) |
| string | $value |
Definition at line 1173 of file agenda.lib.php.
| agenda_get_birthday_events | ( | $db, | |
| $langs, | |||
| $user, | |||
| $mode, | |||
| $month, | |||
| $day, | |||
| $year, | |||
| & | $eventarray, | ||
| & | $nbevents ) |
Complete an agenda calendar event array with contact birthday pseudo-events.
Shared by the month, week and day agenda views (comm/action/index.php, comm/action/peruser.php).
| DoliDB | $db | Database handler |
| Translate | $langs | Language object (already loaded) |
| User | $user | Current user (used for private contact visibility) |
| string | $mode | 'show_day' restricts to the given day, any other value = whole month |
| int | $month | Month number (1-12) |
| int | $day | Day of month (only used when $mode == 'show_day') |
| int | $year | Year the birthday events must be placed in |
| array<int,ActionComm[]> | $eventarray Event array to complete, keyed by GMT day timestamp (modified by reference) | |
| int | $nbevents | Running event counter (modified by reference) |
Definition at line 1537 of file agenda.lib.php.
| agenda_prepare_head | ( | ) |
Prepare array with list of tabs.
Definition at line 399 of file agenda.lib.php.
References $conf, complete_head_from_modules(), and dolBuildUrl().
| calendars_prepare_head | ( | $param | ) |
Define head array for tabs of agenda setup pages.
| string | $param | Parameters to add to url |
Definition at line 517 of file agenda.lib.php.
References $conf, complete_head_from_modules(), dolBuildUrl(), and getDolGlobalString().
| dol_color_minus | ( | $color, | |
| $minus, | |||
| $minusunit = 16 ) |
Change color with a delta.
| string | $color | Color |
| int | $minus | Delta (1 = 16 unit). Positive value = darker color, Negative value = brighter color. |
| int | $minusunit | Minus unit |
Definition at line 1140 of file agenda.lib.php.
| print_actions_filter | ( | $form, | |
| $canedit, | |||
| $status, | |||
| $year, | |||
| $month, | |||
| $day, | |||
| $showbirthday, | |||
| $filtera, | |||
| $filtert, | |||
| $filtered, | |||
| $pid, | |||
| $socid, | |||
| $action, | |||
| $showextcals = array(), | |||
| $actioncode = '', | |||
| $usergroupid = 0, | |||
| $excludetype = '', | |||
| $resourceid = 0, | |||
| $search_categ_cus = 0, | |||
| $search_import_key = '' ) |
Show filter form in agenda view.
| Form | $form | Form object |
| int | $canedit | Can edit filter fields |
| string | $status | Status see FormActions\form_select_status_action |
| int | $year | Year |
| int | $month | Month |
| int | $day | Day |
| int | $showbirthday | Show birthday |
| string | $filtera | Filter on create by user |
| string | $filtert | Filter on assigned to user |
| string | $filtered | Filter of done by user |
| int | $pid | Product id |
| int | $socid | Third party id |
| string | $action | Action string |
| array<array{type:string,sr:string,name:string,offsettz:int,color:string,default:string,buggedfile:string}>|int<-1,-1> | $showextcals Array with list of external calendars (used to show links to select calendar), or -1 to show no legend | |
| string | string[] | $actioncode | Preselected value(s) of actioncode for filter on event type |
| int | int[] | $usergroupid | Id of group to filter on users |
| ''|'systemauto'|'system' | $excludetype A type to exclude ('systemauto', 'system', '') | |
| int | $resourceid | Preselected value of resource for filter on resource |
| int | $search_categ_cus | Tag id |
| string | $search_import_key | Import IDfilter |
Definition at line 54 of file agenda.lib.php.
References $db, $object, getDolGlobalString(), img_picto(), isModEnabled(), and string.
| show_array_actions_to_do | ( | $max = 5 | ) |
Show actions to do array.
| int | $max | Max nb of records |
Definition at line 181 of file agenda.lib.php.
References $conf, $db, dol_now(), dol_print_error(), and img_warning().
| show_array_last_actions_done | ( | $max = 5 | ) |
Show last actions array.
| int | $max | Max nb of records |
Definition at line 301 of file agenda.lib.php.
References $conf, $db, dol_now(), and dol_print_error().