3 <html lang=
"en" class=
"no-js">
7 <meta name=
"viewport" content=
"width=device-width,initial-scale=1">
12 <link rel=
"icon" href=
"../../assets/default.favicon.ico">
13 <meta name=
"generator" content=
"mkdocs-1.1.2, mkdocs-material-7.1.0">
17 <title>Documentation - WoltLab Suite Documentation
</title>
21 <link rel=
"stylesheet" href=
"../../assets/stylesheets/main.33e2939f.min.css">
24 <link rel=
"stylesheet" href=
"../../assets/stylesheets/palette.ef6f36e2.min.css">
28 <meta name=
"theme-color" content=
"#009485">
38 <link rel=
"stylesheet" href=
"../../stylesheets/extra.css">
52 <body dir=
"ltr" data-md-color-scheme=
"" data-md-color-primary=
"teal" data-md-color-accent=
"">
55 <script>function __prefix(e){return new URL(
"../..",location).pathname+
"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}
</script>
57 <input class=
"md-toggle" data-md-toggle=
"drawer" type=
"checkbox" id=
"__drawer" autocomplete=
"off">
58 <input class=
"md-toggle" data-md-toggle=
"search" type=
"checkbox" id=
"__search" autocomplete=
"off">
59 <label class=
"md-overlay" for=
"__drawer"></label>
60 <div data-md-component=
"skip">
63 <a href=
"#documentation" class=
"md-skip">
68 <div data-md-component=
"announce">
70 <aside class=
"md-announce">
71 <div class=
"md-announce__inner md-grid md-typeset">
73 <a href=
"https://www.woltlab.com">Back to
<strong>woltlab.com
</strong></a>
80 <header class=
"md-header" data-md-component=
"header">
81 <nav class=
"md-header__inner md-grid" aria-label=
"Header">
82 <a href=
"../.." title=
"WoltLab Suite Documentation" class=
"md-header__button md-logo" aria-label=
"WoltLab Suite Documentation" data-md-component=
"logo">
84 <img src=
"../../assets/logo.png" alt=
"logo">
87 <label class=
"md-header__button md-icon" for=
"__drawer">
88 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
90 <div class=
"md-header__title" data-md-component=
"header-title">
91 <div class=
"md-header__ellipsis">
92 <div class=
"md-header__topic">
93 <span class=
"md-ellipsis">
94 WoltLab Suite Documentation
97 <div class=
"md-header__topic" data-md-component=
"header-topic">
98 <span class=
"md-ellipsis">
109 <label class=
"md-header__button md-icon" for=
"__search">
110 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
113 <div class=
"md-search" data-md-component=
"search" role=
"dialog">
114 <label class=
"md-search__overlay" for=
"__search"></label>
115 <div class=
"md-search__inner" role=
"search">
116 <form class=
"md-search__form" name=
"search">
117 <input type=
"text" class=
"md-search__input" name=
"query" aria-label=
"Search" placeholder=
"Search" autocapitalize=
"off" autocorrect=
"off" autocomplete=
"off" spellcheck=
"false" data-md-component=
"search-query" data-md-state=
"active" required
>
118 <label class=
"md-search__icon md-icon" for=
"__search">
119 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
120 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
122 <button type=
"reset" class=
"md-search__icon md-icon" aria-label=
"Clear" tabindex=
"-1">
123 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
126 <div class=
"md-search__output">
127 <div class=
"md-search__scrollwrap" data-md-scrollfix
>
128 <div class=
"md-search-result" data-md-component=
"search-result">
129 <div class=
"md-search-result__meta">
132 <ol class=
"md-search-result__list"></ol>
140 <div class=
"md-header__source">
142 <a href=
"https://github.com/WoltLab/docs.woltlab.com/" title=
"Go to repository" class=
"md-source" data-md-component=
"source">
143 <div class=
"md-source__icon md-icon">
145 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 448 512"><path d=
"M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
147 <div class=
"md-source__repository">
156 <div class=
"md-container" data-md-component=
"container">
161 <main class=
"md-main" data-md-component=
"main">
162 <div class=
"md-main__inner md-grid">
166 <div class=
"md-sidebar md-sidebar--primary" data-md-component=
"sidebar" data-md-type=
"navigation" >
167 <div class=
"md-sidebar__scrollwrap">
168 <div class=
"md-sidebar__inner">
172 <nav class=
"md-nav md-nav--primary" aria-label=
"Navigation" data-md-level=
"0">
173 <label class=
"md-nav__title" for=
"__drawer">
174 <a href=
"../.." title=
"WoltLab Suite Documentation" class=
"md-nav__button md-logo" aria-label=
"WoltLab Suite Documentation" data-md-component=
"logo">
176 <img src=
"../../assets/logo.png" alt=
"logo">
179 WoltLab Suite Documentation
182 <div class=
"md-nav__source">
184 <a href=
"https://github.com/WoltLab/docs.woltlab.com/" title=
"Go to repository" class=
"md-source" data-md-component=
"source">
185 <div class=
"md-source__icon md-icon">
187 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 448 512"><path d=
"M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
189 <div class=
"md-source__repository">
195 <ul class=
"md-nav__list" data-md-scrollfix
>
204 <li class=
"md-nav__item">
205 <a href=
"../../getting-started/" class=
"md-nav__link">
220 <li class=
"md-nav__item md-nav__item--nested">
223 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2" type=
"checkbox" id=
"__nav_2" >
225 <label class=
"md-nav__link" for=
"__nav_2">
227 <span class=
"md-nav__icon md-icon"></span>
229 <nav class=
"md-nav" aria-label=
"PHP API" data-md-level=
"1">
230 <label class=
"md-nav__title" for=
"__nav_2">
231 <span class=
"md-nav__icon md-icon"></span>
234 <ul class=
"md-nav__list" data-md-scrollfix
>
240 <li class=
"md-nav__item">
241 <a href=
"../pages/" class=
"md-nav__link">
252 <li class=
"md-nav__item">
253 <a href=
"../database-objects/" class=
"md-nav__link">
264 <li class=
"md-nav__item">
265 <a href=
"../database-access/" class=
"md-nav__link">
276 <li class=
"md-nav__item">
277 <a href=
"../exceptions/" class=
"md-nav__link">
289 <li class=
"md-nav__item md-nav__item--nested">
292 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5" type=
"checkbox" id=
"__nav_2_5" >
294 <label class=
"md-nav__link" for=
"__nav_2_5">
296 <span class=
"md-nav__icon md-icon"></span>
298 <nav class=
"md-nav" aria-label=
"API" data-md-level=
"2">
299 <label class=
"md-nav__title" for=
"__nav_2_5">
300 <span class=
"md-nav__icon md-icon"></span>
303 <ul class=
"md-nav__list" data-md-scrollfix
>
310 <li class=
"md-nav__item md-nav__item--nested">
313 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5_1" type=
"checkbox" id=
"__nav_2_5_1" >
315 <label class=
"md-nav__link" for=
"__nav_2_5_1">
317 <span class=
"md-nav__icon md-icon"></span>
319 <nav class=
"md-nav" aria-label=
"Caches" data-md-level=
"3">
320 <label class=
"md-nav__title" for=
"__nav_2_5_1">
321 <span class=
"md-nav__icon md-icon"></span>
324 <ul class=
"md-nav__list" data-md-scrollfix
>
330 <li class=
"md-nav__item">
331 <a href=
"../api/caches/" class=
"md-nav__link">
342 <li class=
"md-nav__item">
343 <a href=
"../api/caches_persistent-caches/" class=
"md-nav__link">
354 <li class=
"md-nav__item">
355 <a href=
"../api/caches_runtime-caches/" class=
"md-nav__link">
372 <li class=
"md-nav__item">
373 <a href=
"../api/comments/" class=
"md-nav__link">
384 <li class=
"md-nav__item">
385 <a href=
"../api/cronjobs/" class=
"md-nav__link">
396 <li class=
"md-nav__item">
397 <a href=
"../api/events/" class=
"md-nav__link">
409 <li class=
"md-nav__item md-nav__item--nested">
412 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5_5" type=
"checkbox" id=
"__nav_2_5_5" >
414 <label class=
"md-nav__link" for=
"__nav_2_5_5">
416 <span class=
"md-nav__icon md-icon"></span>
418 <nav class=
"md-nav" aria-label=
"Form Builder" data-md-level=
"3">
419 <label class=
"md-nav__title" for=
"__nav_2_5_5">
420 <span class=
"md-nav__icon md-icon"></span>
423 <ul class=
"md-nav__list" data-md-scrollfix
>
429 <li class=
"md-nav__item">
430 <a href=
"../api/form_builder/overview/" class=
"md-nav__link">
441 <li class=
"md-nav__item">
442 <a href=
"../api/form_builder/structure/" class=
"md-nav__link">
453 <li class=
"md-nav__item">
454 <a href=
"../api/form_builder/form_fields/" class=
"md-nav__link">
465 <li class=
"md-nav__item">
466 <a href=
"../api/form_builder/validation_data/" class=
"md-nav__link">
477 <li class=
"md-nav__item">
478 <a href=
"../api/form_builder/dependencies/" class=
"md-nav__link">
495 <li class=
"md-nav__item">
496 <a href=
"../api/package_installation_plugins/" class=
"md-nav__link">
497 Package Installation Plugins
507 <li class=
"md-nav__item">
508 <a href=
"../api/user_activity_points/" class=
"md-nav__link">
519 <li class=
"md-nav__item">
520 <a href=
"../api/user_notifications/" class=
"md-nav__link">
531 <li class=
"md-nav__item">
532 <a href=
"../api/sitemaps/" class=
"md-nav__link">
549 <li class=
"md-nav__item">
550 <a href=
"../code-style/" class=
"md-nav__link">
561 <li class=
"md-nav__item">
562 <a href=
"../apps/" class=
"md-nav__link">
573 <li class=
"md-nav__item">
574 <a href=
"../gdpr/" class=
"md-nav__link">
595 <li class=
"md-nav__item md-nav__item--nested">
598 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_3" type=
"checkbox" id=
"__nav_3" >
600 <label class=
"md-nav__link" for=
"__nav_3">
601 Languages, Templates & CSS
602 <span class=
"md-nav__icon md-icon"></span>
604 <nav class=
"md-nav" aria-label=
"Languages, Templates & CSS" data-md-level=
"1">
605 <label class=
"md-nav__title" for=
"__nav_3">
606 <span class=
"md-nav__icon md-icon"></span>
607 Languages, Templates & CSS
609 <ul class=
"md-nav__list" data-md-scrollfix
>
615 <li class=
"md-nav__item">
616 <a href=
"../../view/languages/" class=
"md-nav__link">
627 <li class=
"md-nav__item">
628 <a href=
"../../view/templates/" class=
"md-nav__link">
639 <li class=
"md-nav__item">
640 <a href=
"../../view/template-plugins/" class=
"md-nav__link">
651 <li class=
"md-nav__item">
652 <a href=
"../../view/css/" class=
"md-nav__link">
673 <li class=
"md-nav__item md-nav__item--nested">
676 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4" type=
"checkbox" id=
"__nav_4" >
678 <label class=
"md-nav__link" for=
"__nav_4">
679 TypeScript and JavaScript API
680 <span class=
"md-nav__icon md-icon"></span>
682 <nav class=
"md-nav" aria-label=
"TypeScript and JavaScript API" data-md-level=
"1">
683 <label class=
"md-nav__title" for=
"__nav_4">
684 <span class=
"md-nav__icon md-icon"></span>
685 TypeScript and JavaScript API
687 <ul class=
"md-nav__list" data-md-scrollfix
>
693 <li class=
"md-nav__item">
694 <a href=
"../../javascript/general-usage/" class=
"md-nav__link">
705 <li class=
"md-nav__item">
706 <a href=
"../../javascript/typescript/" class=
"md-nav__link">
718 <li class=
"md-nav__item md-nav__item--nested">
721 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4_3" type=
"checkbox" id=
"__nav_4_3" >
723 <label class=
"md-nav__link" for=
"__nav_4_3">
725 <span class=
"md-nav__icon md-icon"></span>
727 <nav class=
"md-nav" aria-label=
"New API" data-md-level=
"2">
728 <label class=
"md-nav__title" for=
"__nav_4_3">
729 <span class=
"md-nav__icon md-icon"></span>
732 <ul class=
"md-nav__list" data-md-scrollfix
>
738 <li class=
"md-nav__item">
739 <a href=
"../../javascript/new-api_writing-a-module/" class=
"md-nav__link">
750 <li class=
"md-nav__item">
751 <a href=
"../../javascript/new-api_data-structures/" class=
"md-nav__link">
762 <li class=
"md-nav__item">
763 <a href=
"../../javascript/new-api_core/" class=
"md-nav__link">
774 <li class=
"md-nav__item">
775 <a href=
"../../javascript/new-api_dom/" class=
"md-nav__link">
786 <li class=
"md-nav__item">
787 <a href=
"../../javascript/new-api_events/" class=
"md-nav__link">
798 <li class=
"md-nav__item">
799 <a href=
"../../javascript/new-api_ajax/" class=
"md-nav__link">
810 <li class=
"md-nav__item">
811 <a href=
"../../javascript/new-api_dialogs/" class=
"md-nav__link">
822 <li class=
"md-nav__item">
823 <a href=
"../../javascript/new-api_browser/" class=
"md-nav__link">
824 Browser and Screen Sizes
834 <li class=
"md-nav__item">
835 <a href=
"../../javascript/new-api_ui/" class=
"md-nav__link">
852 <li class=
"md-nav__item">
853 <a href=
"../../javascript/legacy-api/" class=
"md-nav__link">
864 <li class=
"md-nav__item">
865 <a href=
"../../javascript/helper-functions/" class=
"md-nav__link">
876 <li class=
"md-nav__item">
877 <a href=
"../../javascript/code-snippets/" class=
"md-nav__link">
898 <li class=
"md-nav__item md-nav__item--nested">
901 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5" type=
"checkbox" id=
"__nav_5" >
903 <label class=
"md-nav__link" for=
"__nav_5">
905 <span class=
"md-nav__icon md-icon"></span>
907 <nav class=
"md-nav" aria-label=
"Package Components" data-md-level=
"1">
908 <label class=
"md-nav__title" for=
"__nav_5">
909 <span class=
"md-nav__icon md-icon"></span>
912 <ul class=
"md-nav__list" data-md-scrollfix
>
918 <li class=
"md-nav__item">
919 <a href=
"../../package/package-xml/" class=
"md-nav__link">
931 <li class=
"md-nav__item md-nav__item--nested">
934 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5_2" type=
"checkbox" id=
"__nav_5_2" >
936 <label class=
"md-nav__link" for=
"__nav_5_2">
938 <span class=
"md-nav__icon md-icon"></span>
940 <nav class=
"md-nav" aria-label=
"PIPs" data-md-level=
"2">
941 <label class=
"md-nav__title" for=
"__nav_5_2">
942 <span class=
"md-nav__icon md-icon"></span>
945 <ul class=
"md-nav__list" data-md-scrollfix
>
951 <li class=
"md-nav__item">
952 <a href=
"../../package/pip/" class=
"md-nav__link">
963 <li class=
"md-nav__item">
964 <a href=
"../../package/pip/acl-option/" class=
"md-nav__link">
975 <li class=
"md-nav__item">
976 <a href=
"../../package/pip/acp-menu/" class=
"md-nav__link">
987 <li class=
"md-nav__item">
988 <a href=
"../../package/pip/acp-search-provider/" class=
"md-nav__link">
999 <li class=
"md-nav__item">
1000 <a href=
"../../package/pip/acp-template/" class=
"md-nav__link">
1011 <li class=
"md-nav__item">
1012 <a href=
"../../package/pip/bbcode/" class=
"md-nav__link">
1023 <li class=
"md-nav__item">
1024 <a href=
"../../package/pip/box/" class=
"md-nav__link">
1035 <li class=
"md-nav__item">
1036 <a href=
"../../package/pip/clipboard-action/" class=
"md-nav__link">
1047 <li class=
"md-nav__item">
1048 <a href=
"../../package/pip/core-object/" class=
"md-nav__link">
1059 <li class=
"md-nav__item">
1060 <a href=
"../../package/pip/cronjob/" class=
"md-nav__link">
1071 <li class=
"md-nav__item">
1072 <a href=
"../../package/pip/database/" class=
"md-nav__link">
1083 <li class=
"md-nav__item">
1084 <a href=
"../../package/pip/event-listener/" class=
"md-nav__link">
1095 <li class=
"md-nav__item">
1096 <a href=
"../../package/pip/file/" class=
"md-nav__link">
1107 <li class=
"md-nav__item">
1108 <a href=
"../../package/pip/language/" class=
"md-nav__link">
1119 <li class=
"md-nav__item">
1120 <a href=
"../../package/pip/media-provider/" class=
"md-nav__link">
1131 <li class=
"md-nav__item">
1132 <a href=
"../../package/pip/menu/" class=
"md-nav__link">
1143 <li class=
"md-nav__item">
1144 <a href=
"../../package/pip/menu-item/" class=
"md-nav__link">
1155 <li class=
"md-nav__item">
1156 <a href=
"../../package/pip/object-type/" class=
"md-nav__link">
1167 <li class=
"md-nav__item">
1168 <a href=
"../../package/pip/object-type-definition/" class=
"md-nav__link">
1169 objectTypeDefinition
1179 <li class=
"md-nav__item">
1180 <a href=
"../../package/pip/option/" class=
"md-nav__link">
1191 <li class=
"md-nav__item">
1192 <a href=
"../../package/pip/page/" class=
"md-nav__link">
1203 <li class=
"md-nav__item">
1204 <a href=
"../../package/pip/pip/" class=
"md-nav__link">
1215 <li class=
"md-nav__item">
1216 <a href=
"../../package/pip/script/" class=
"md-nav__link">
1227 <li class=
"md-nav__item">
1228 <a href=
"../../package/pip/smiley/" class=
"md-nav__link">
1239 <li class=
"md-nav__item">
1240 <a href=
"../../package/pip/sql/" class=
"md-nav__link">
1251 <li class=
"md-nav__item">
1252 <a href=
"../../package/pip/style/" class=
"md-nav__link">
1263 <li class=
"md-nav__item">
1264 <a href=
"../../package/pip/template/" class=
"md-nav__link">
1275 <li class=
"md-nav__item">
1276 <a href=
"../../package/pip/template-listener/" class=
"md-nav__link">
1287 <li class=
"md-nav__item">
1288 <a href=
"../../package/pip/user-group-option/" class=
"md-nav__link">
1299 <li class=
"md-nav__item">
1300 <a href=
"../../package/pip/user-menu/" class=
"md-nav__link">
1311 <li class=
"md-nav__item">
1312 <a href=
"../../package/pip/user-notification-event/" class=
"md-nav__link">
1313 userNotificationEvent
1323 <li class=
"md-nav__item">
1324 <a href=
"../../package/pip/user-option/" class=
"md-nav__link">
1335 <li class=
"md-nav__item">
1336 <a href=
"../../package/pip/user-profile-menu/" class=
"md-nav__link">
1353 <li class=
"md-nav__item">
1354 <a href=
"../../package/database-php-api/" class=
"md-nav__link">
1375 <li class=
"md-nav__item md-nav__item--nested">
1378 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6" type=
"checkbox" id=
"__nav_6" >
1380 <label class=
"md-nav__link" for=
"__nav_6">
1382 <span class=
"md-nav__icon md-icon"></span>
1384 <nav class=
"md-nav" aria-label=
"Migration" data-md-level=
"1">
1385 <label class=
"md-nav__title" for=
"__nav_6">
1386 <span class=
"md-nav__icon md-icon"></span>
1389 <ul class=
"md-nav__list" data-md-scrollfix
>
1396 <li class=
"md-nav__item md-nav__item--nested">
1399 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_1" type=
"checkbox" id=
"__nav_6_1" >
1401 <label class=
"md-nav__link" for=
"__nav_6_1">
1402 Migrating from WSC
5.3
1403 <span class=
"md-nav__icon md-icon"></span>
1405 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.3" data-md-level=
"2">
1406 <label class=
"md-nav__title" for=
"__nav_6_1">
1407 <span class=
"md-nav__icon md-icon"></span>
1408 Migrating from WSC
5.3
1410 <ul class=
"md-nav__list" data-md-scrollfix
>
1416 <li class=
"md-nav__item">
1417 <a href=
"../../migration/wsc53/php/" class=
"md-nav__link">
1428 <li class=
"md-nav__item">
1429 <a href=
"../../migration/wsc53/session/" class=
"md-nav__link">
1430 Session Handling and Authentication
1440 <li class=
"md-nav__item">
1441 <a href=
"../../migration/wsc53/javascript/" class=
"md-nav__link">
1442 TypeScript and JavaScript
1452 <li class=
"md-nav__item">
1453 <a href=
"../../migration/wsc53/templates/" class=
"md-nav__link">
1464 <li class=
"md-nav__item">
1465 <a href=
"../../migration/wsc53/libraries/" class=
"md-nav__link">
1466 Third Party Libraries
1483 <li class=
"md-nav__item md-nav__item--nested">
1486 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_2" type=
"checkbox" id=
"__nav_6_2" >
1488 <label class=
"md-nav__link" for=
"__nav_6_2">
1489 Migrating from WSC
5.2
1490 <span class=
"md-nav__icon md-icon"></span>
1492 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.2" data-md-level=
"2">
1493 <label class=
"md-nav__title" for=
"__nav_6_2">
1494 <span class=
"md-nav__icon md-icon"></span>
1495 Migrating from WSC
5.2
1497 <ul class=
"md-nav__list" data-md-scrollfix
>
1503 <li class=
"md-nav__item">
1504 <a href=
"../../migration/wsc52/php/" class=
"md-nav__link">
1515 <li class=
"md-nav__item">
1516 <a href=
"../../migration/wsc52/templates/" class=
"md-nav__link">
1517 Templates and Languages
1527 <li class=
"md-nav__item">
1528 <a href=
"../../migration/wsc52/libraries/" class=
"md-nav__link">
1529 Third Party Libraries
1546 <li class=
"md-nav__item md-nav__item--nested">
1549 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_3" type=
"checkbox" id=
"__nav_6_3" >
1551 <label class=
"md-nav__link" for=
"__nav_6_3">
1552 Migrating from WSC
3.1
1553 <span class=
"md-nav__icon md-icon"></span>
1555 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.1" data-md-level=
"2">
1556 <label class=
"md-nav__title" for=
"__nav_6_3">
1557 <span class=
"md-nav__icon md-icon"></span>
1558 Migrating from WSC
3.1
1560 <ul class=
"md-nav__list" data-md-scrollfix
>
1566 <li class=
"md-nav__item">
1567 <a href=
"../../migration/wsc31/php/" class=
"md-nav__link">
1585 <li class=
"md-nav__item md-nav__item--nested">
1588 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_4" type=
"checkbox" id=
"__nav_6_4" >
1590 <label class=
"md-nav__link" for=
"__nav_6_4">
1591 Migrating from WSC
3.0
1592 <span class=
"md-nav__icon md-icon"></span>
1594 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.0" data-md-level=
"2">
1595 <label class=
"md-nav__title" for=
"__nav_6_4">
1596 <span class=
"md-nav__icon md-icon"></span>
1597 Migrating from WSC
3.0
1599 <ul class=
"md-nav__list" data-md-scrollfix
>
1605 <li class=
"md-nav__item">
1606 <a href=
"../../migration/wsc30/php/" class=
"md-nav__link">
1617 <li class=
"md-nav__item">
1618 <a href=
"../../migration/wsc30/javascript/" class=
"md-nav__link">
1629 <li class=
"md-nav__item">
1630 <a href=
"../../migration/wsc30/templates/" class=
"md-nav__link">
1641 <li class=
"md-nav__item">
1642 <a href=
"../../migration/wsc30/css/" class=
"md-nav__link">
1653 <li class=
"md-nav__item">
1654 <a href=
"../../migration/wsc30/package/" class=
"md-nav__link">
1672 <li class=
"md-nav__item md-nav__item--nested">
1675 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_5" type=
"checkbox" id=
"__nav_6_5" >
1677 <label class=
"md-nav__link" for=
"__nav_6_5">
1678 Migrating from WCF
2.1
1679 <span class=
"md-nav__icon md-icon"></span>
1681 <nav class=
"md-nav" aria-label=
"Migrating from WCF 2.1" data-md-level=
"2">
1682 <label class=
"md-nav__title" for=
"__nav_6_5">
1683 <span class=
"md-nav__icon md-icon"></span>
1684 Migrating from WCF
2.1
1686 <ul class=
"md-nav__list" data-md-scrollfix
>
1692 <li class=
"md-nav__item">
1693 <a href=
"../../migration/wcf21/php/" class=
"md-nav__link">
1704 <li class=
"md-nav__item">
1705 <a href=
"../../migration/wcf21/templates/" class=
"md-nav__link">
1716 <li class=
"md-nav__item">
1717 <a href=
"../../migration/wcf21/css/" class=
"md-nav__link">
1728 <li class=
"md-nav__item">
1729 <a href=
"../../migration/wcf21/package/" class=
"md-nav__link">
1756 <li class=
"md-nav__item md-nav__item--nested">
1759 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7" type=
"checkbox" id=
"__nav_7" >
1761 <label class=
"md-nav__link" for=
"__nav_7">
1763 <span class=
"md-nav__icon md-icon"></span>
1765 <nav class=
"md-nav" aria-label=
"Tutorials" data-md-level=
"1">
1766 <label class=
"md-nav__title" for=
"__nav_7">
1767 <span class=
"md-nav__icon md-icon"></span>
1770 <ul class=
"md-nav__list" data-md-scrollfix
>
1777 <li class=
"md-nav__item md-nav__item--nested">
1780 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7_1" type=
"checkbox" id=
"__nav_7_1" >
1782 <label class=
"md-nav__link" for=
"__nav_7_1">
1784 <span class=
"md-nav__icon md-icon"></span>
1786 <nav class=
"md-nav" aria-label=
"Tutorial Series" data-md-level=
"2">
1787 <label class=
"md-nav__title" for=
"__nav_7_1">
1788 <span class=
"md-nav__icon md-icon"></span>
1791 <ul class=
"md-nav__list" data-md-scrollfix
>
1797 <li class=
"md-nav__item">
1798 <a href=
"../../tutorial/series/overview/" class=
"md-nav__link">
1809 <li class=
"md-nav__item">
1810 <a href=
"../../tutorial/series/part_1/" class=
"md-nav__link">
1821 <li class=
"md-nav__item">
1822 <a href=
"../../tutorial/series/part_2/" class=
"md-nav__link">
1833 <li class=
"md-nav__item">
1834 <a href=
"../../tutorial/series/part_3/" class=
"md-nav__link">
1861 <div class=
"md-sidebar md-sidebar--secondary" data-md-component=
"sidebar" data-md-type=
"toc" >
1862 <div class=
"md-sidebar__scrollwrap">
1863 <div class=
"md-sidebar__inner">
1865 <nav class=
"md-nav md-nav--secondary" aria-label=
"Table of contents">
1871 <label class=
"md-nav__title" for=
"__toc">
1872 <span class=
"md-nav__icon md-icon"></span>
1875 <ul class=
"md-nav__list" data-md-component=
"toc" data-md-scrollfix
>
1877 <li class=
"md-nav__item">
1878 <a href=
"#database-objects" class=
"md-nav__link">
1882 <nav class=
"md-nav" aria-label=
"Database Objects">
1883 <ul class=
"md-nav__list">
1885 <li class=
"md-nav__item">
1886 <a href=
"#database-table-columns-as-properties" class=
"md-nav__link">
1887 Database Table Columns as Properties
1897 <li class=
"md-nav__item">
1898 <a href=
"#database-object-editors" class=
"md-nav__link">
1899 Database Object Editors
1902 <nav class=
"md-nav" aria-label=
"Database Object Editors">
1903 <ul class=
"md-nav__list">
1905 <li class=
"md-nav__item">
1906 <a href=
"#class-tags" class=
"md-nav__link">
1917 <li class=
"md-nav__item">
1918 <a href=
"#runtime-caches" class=
"md-nav__link">
1922 <nav class=
"md-nav" aria-label=
"Runtime Caches">
1923 <ul class=
"md-nav__list">
1925 <li class=
"md-nav__item">
1926 <a href=
"#class-tags_1" class=
"md-nav__link">
1945 <div class=
"md-content" data-md-component=
"content">
1946 <article class=
"md-content__inner md-typeset">
1949 <a href=
"https://github.com/WoltLab/docs.woltlab.com/edit/5.4/docs/php/code-style-documentation.md" title=
"Edit this page" class=
"md-content__button md-icon">
1950 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
1954 <h1 id=
"documentation">Documentation
<a class=
"headerlink" href=
"#documentation" title=
"Permanent link">#
</a></h1>
1955 <div class=
"admonition info">
1956 <p class=
"admonition-title">The following documentation conventions are used by us for our own packages. While you do not have to follow every rule, you are encouraged to do so.
</p>
1958 <h2 id=
"database-objects">Database Objects
<a class=
"headerlink" href=
"#database-objects" title=
"Permanent link">#
</a></h2>
1959 <h3 id=
"database-table-columns-as-properties">Database Table Columns as Properties
<a class=
"headerlink" href=
"#database-table-columns-as-properties" title=
"Permanent link">#
</a></h3>
1960 <p>As the database table columns are not explicit properties of the classes extending
<code>wcf\data\DatabaseObject
</code> but rather stored in
<code>DatabaseObject::$data
</code> and accessible via
<code>DatabaseObject::__get($name)
</code>, the IDE we use, PhpStorm, is neither able to autocomplete such property access nor to interfere the type of the property.
</p>
1961 <p>To solve this problem,
<code>@property-read
</code> tags must be added to the class documentation which registers the database table columns as public read-only properties:
</p>
1962 <div class=
"highlight"><pre><span></span><code> * @property-read propertyType $propertyName property description
1964 <p>The properties have to be in the same order as the order in the database table.
</p>
1965 <p>The following table provides templates for common description texts so that similar database table columns have similar description texts.
</p>
1970 <th>description template and example
</th>
1975 <td>unique object id
</td>
1976 <td><code>unique id of the {object name}
</code><br><strong>example:
</strong> <code>unique id of the acl option
</code></td>
1979 <td>id of the delivering package
</td>
1980 <td><code>id of the package which delivers the {object name}
</code><br><strong>example:
</strong> <code>id of the package which delivers the acl option
</code></td>
1983 <td>show order for nested structure
</td>
1984 <td><code>position of the {object name} in relation to its siblings
</code><br><strong>example:
</strong> <code>position of the ACP menu item in relation to its siblings
</code></td>
1987 <td>show order within different object
</td>
1988 <td><code>position of the {object name} in relation to the other {object name}s in the {parent object name}
</code><br><strong>example:
</strong> <code>position of the label in relation to the other labels in the label group
</code></td>
1991 <td>required permissions
</td>
1992 <td><code>comma separated list of user group permissions of which the active user needs to have at least one to see (access, …) the {object name}
</code><br><strong>example:
</strong><code>comma separated list of user group permissions of which the active user needs to have at least one to see the ACP menu item
</code></td>
1995 <td>required options
</td>
1996 <td><code>comma separated list of options of which at least one needs to be enabled for the {object name} to be shown (accessible, …)
</code><br><strong>example:
</strong><code>comma separated list of options of which at least one needs to be enabled for the ACP menu item to be shown
</code></td>
1999 <td>id of the user who has created the object
</td>
2000 <td><code>id of the user who created (wrote, …) the {object name} (or `null` if the user does not exist anymore (or if the {object name} has been created by a guest))
</code><br><strong>example:
</strong><code>id of the user who wrote the comment or `null` if the user does not exist anymore or if the comment has been written by a guest
</code></td>
2003 <td>name of the user who has created the object
</td>
2004 <td><code>name of the user (or guest) who created (wrote, …) the {object name}
</code><br><strong>example:
</strong><code>name of the user or guest who wrote the comment
</code></td>
2007 <td>additional data
</td>
2008 <td><code>array with additional data of the {object name}
</code><br><strong>example:
</strong><code>array with additional data of the user activity event
</code></td>
2011 <td>time-related columns
</td>
2012 <td><code>timestamp at which the {object name} has been created (written, …)
</code><br><strong>example:
</strong><code>timestamp at which the comment has been written
</code></td>
2015 <td>boolean options
</td>
2016 <td><code>is `
1` (or `
0`) if the {object name} … (and thus …), otherwise `
0` (or `
1`)
</code><br><strong>example:
</strong><code>is `
1` if the ad is disabled and thus not shown, otherwise `
0`
</code></td>
2019 <td><code>$cumulativeLikes
</code></td>
2020 <td><code>cumulative result of likes (counting `+
1`) and dislikes (counting `-
1`) for the {object name}
</code><br><strong>example:
</strong><code>cumulative result of likes (counting `+
1`) and dislikes (counting `-
1`) for the article
</code></td>
2023 <td><code>$comments
</code></td>
2024 <td><code>number of comments on the {object name}
</code><br><strong>example:
</strong><code>number of comments on the article
</code></td>
2027 <td><code>$views
</code></td>
2028 <td><code>number of times the {object name} has been viewed
</code><br><strong>example:
</strong><code>number of times the article has been viewed
</code></td>
2031 <td>text field with potential language item name as value
</td>
2032 <td><code>{text type} of the {object name} or name of language item which contains the {text type}
</code><br><strong>example:
</strong><code>description of the cronjob or name of language item which contains the description
</code></td>
2035 <td><code>$objectTypeID
</code></td>
2036 <td><code>id of the `{object type definition name}` object type
</code><br><strong>example:
</strong><code>id of the `com.woltlab.wcf.modifiableContent` object type
</code></td>
2040 <h2 id=
"database-object-editors">Database Object Editors
<a class=
"headerlink" href=
"#database-object-editors" title=
"Permanent link">#
</a></h2>
2041 <h3 id=
"class-tags">Class Tags
<a class=
"headerlink" href=
"#class-tags" title=
"Permanent link">#
</a></h3>
2042 <p>Any database object editor class comment must have to following tags to properly support autocompletion by IDEs:
</p>
2043 <div class=
"highlight"><pre><span></span><code><span class=
"sd">/**
</span>
2044 <span class=
"sd"> * …
</span>
2045 <span class=
"sd"> * @method static {DBO class name} create(array $parameters = [])
</span>
2046 <span class=
"sd"> * @method {DBO class name} getDecoratedObject()
</span>
2047 <span class=
"sd"> * @mixin {DBO class name}
</span>
2048 <span class=
"sd"> */
</span>
2050 <p>The only exception to this rule is if the class overwrites the
<code>create()
</code> method which itself has to be properly documentation then.
</p>
2051 <p>The first and second line makes sure that when calling the
<code>create()
</code> or
<code>getDecoratedObject()
</code> method, the return value is correctly recognized and not just a general
<code>DatabaseObject
</code> instance.
2052 The third line tells the IDE (if
<code>@mixin
</code> is supported) that the database object editor decorates the database object and therefore offers autocompletion for properties and methods from the database object class itself.
</p>
2053 <h2 id=
"runtime-caches">Runtime Caches
<a class=
"headerlink" href=
"#runtime-caches" title=
"Permanent link">#
</a></h2>
2054 <h3 id=
"class-tags_1">Class Tags
<a class=
"headerlink" href=
"#class-tags_1" title=
"Permanent link">#
</a></h3>
2055 <p>Any class implementing the
<a href=
"https://github.com/WoltLab/WCF/blob/master/wcfsetup/install/files/lib/system/cache/runtime/IRuntimeCache.class.php">IRuntimeCache
</a> interface must have the following class tags:
</p>
2056 <div class=
"highlight"><pre><span></span><code><span class=
"sd">/**
</span>
2057 <span class=
"sd"> * …
</span>
2058 <span class=
"sd"> * @method {DBO class name}[] getCachedObjects()
</span>
2059 <span class=
"sd"> * @method {DBO class name} getObject($objectID)
</span>
2060 <span class=
"sd"> * @method {DBO class name}[] getObjects(array $objectIDs)
</span>
2061 <span class=
"sd"> */
</span>
2063 <p>These tags ensure that when calling any of the mentioned methods, the return value refers to the concrete database object and not just generically to
<a href=
"https://github.com/WoltLab/WCF/blob/master/wcfsetup/install/files/lib/data/DatabaseObject.class.php">DatabaseObject
</a>.
</p>
2069 <div class=
"md-source-date">
2072 Last update:
2021-
01-
08
2091 <footer class=
"md-footer">
2093 <div class=
"md-footer-meta md-typeset">
2094 <div class=
"md-footer-meta__inner md-grid">
2095 <div class=
"md-footer-copyright">
2097 <div class=
"md-footer-copyright__highlight">
2098 Copyright ©
2020 WoltLab GmbH
2102 <a href=
"https://squidfunk.github.io/mkdocs-material/" target=
"_blank" rel=
"noopener">
2107 <div class=
"md-footer-copyright">
2108 <a href=
"https://www.woltlab.com/legal-notice/">Legal Notice
</a>
2109 <a href=
"https://www.woltlab.com/privacy-policy/">Privacy Policy
</a>
2116 <div class=
"md-dialog" data-md-component=
"dialog">
2117 <div class=
"md-dialog__inner md-typeset"></div>
2119 <script id=
"__config" type=
"application/json">{
"base":
"../..",
"features": [],
"translations": {
"clipboard.copy":
"Copy to clipboard",
"clipboard.copied":
"Copied to clipboard",
"search.config.lang":
"en",
"search.config.pipeline":
"trimmer, stopWordFilter",
"search.config.separator":
"[\\s\\-]+",
"search.placeholder":
"Search",
"search.result.placeholder":
"Type to start searching",
"search.result.none":
"No matching documents",
"search.result.one":
"1 matching document",
"search.result.other":
"# matching documents",
"search.result.more.one":
"1 more on this page",
"search.result.more.other":
"# more on this page",
"search.result.term.missing":
"Missing"},
"search":
"../../assets/javascripts/workers/search.fe42c31b.min.js",
"version": {
"provider":
"mike"}}
</script>
2122 <script src=
"../../assets/javascripts/bundle.d892486b.min.js"></script>