8 private function texts() {
12 dbx()->use_system_class(
'dbxForm');
13 $texts = new \dbxForm();
17 $texts->set_form_help_enabled(
false);
18 $texts->_fd =
'dbxAdmin|admin-help-ui';
19 $texts->load_fd_messages();
20 $this->texts = $texts;
24 private function tpl() {
25 return dbx()->get_system_obj(
'dbxTPL');
28 private function h(
$value) {
29 return htmlspecialchars((
string)
$value, ENT_QUOTES,
'UTF-8');
34 'dashboard' => array(
'title' =>
'Admin Dashboard',
'tpl' =>
'admin-help-dashboard',
'permalink' =>
'help-dashboard-admin'),
35 'cache' => array(
'title' =>
'Page-Cache',
'tpl' =>
'admin-help-cache',
'permalink' =>
'help-cache-content'),
36 'dd_list' => array(
'title' =>
'DataDic Sync',
'tpl' =>
'admin-help-dd-list',
'permalink' =>
'help-datadic-sync'),
37 'dd_fields' => array(
'title' =>
'DD Feldvergleich',
'tpl' =>
'admin-help-dd-fields',
'permalink' =>
'help-datadic-felder'),
38 'dd_backup' => array(
'title' =>
'DB Backup & Restore',
'tpl' =>
'admin-help-dd-backup',
'permalink' =>
'help-datenbank-backup'),
39 'db_list' => array(
'title' =>
'DB Sync',
'tpl' =>
'admin-help-db-list',
'permalink' =>
'help-datenbank-sync'),
40 'edit_dd' => array(
'title' =>
'DD Editor',
'tpl' =>
'admin-help-edit-dd',
'permalink' =>
'help-datadic-editor'),
41 'edit_fd' => array(
'title' =>
'FD Editor',
'tpl' =>
'admin-help-edit-fd',
'permalink' =>
'help-formular-editor'),
42 'server' => array(
'title' =>
'Datenbank-Server',
'tpl' =>
'admin-help-server',
'permalink' =>
'help-datenbank-server'),
43 'server_tables' => array(
'title' =>
'Server-Tabellen',
'tpl' =>
'admin-help-server-tables',
'permalink' =>
'help-server-tabellen'),
44 'modules_list' => array(
'title' =>
'Module verwalten',
'tpl' =>
'admin-help-modules-list',
'permalink' =>
'help-module-verwalten'),
45 'modules_new' => array(
'title' =>
'Neues Modul',
'tpl' =>
'admin-help-modules-new',
'permalink' =>
'help-modul-erstellen'),
46 'modules_access' => array(
'title' =>
'Modul-Zugriff',
'tpl' =>
'admin-help-modules-access',
'permalink' =>
'help-modul-zugriff'),
47 'config' => array(
'title' =>
'System-Konfiguration',
'tpl' =>
'admin-help-config',
'permalink' =>
'help-system-konfiguration'),
48 'session' => array(
'title' =>
'Sessions',
'tpl' =>
'admin-help-session',
'permalink' =>
'help-sessions-admin'),
49 'trace' => array(
'title' =>
'Trace / Historie',
'tpl' =>
'admin-help-trace',
'permalink' =>
'help-historie-admin'),
50 'sysmsg' => array(
'title' =>
'System-Meldungen',
'tpl' =>
'admin-help-sysmsg',
'permalink' =>
'help-systemmeldungen-admin'),
51 'missing' => array(
'title' =>
'Missing Files',
'tpl' =>
'admin-help-missing',
'permalink' =>
'help-fehlende-ressourcen'),
52 'contact' => array(
'title' =>
'Kontaktanfragen',
'tpl' =>
'admin-help-contact',
'permalink' =>
'help-kontaktanfragen-admin'),
53 'user' => array(
'title' =>
'Benutzer & Gruppen',
'tpl' =>
'admin-help-user',
'permalink' =>
'help-benutzer-gruppen'),
54 'export_sql' => array(
'title' =>
'SQL Export',
'tpl' =>
'admin-help-export-sql',
'permalink' =>
'help-sql-export'),
55 'datadic' => array(
'title' =>
'DataDic Uebersicht',
'tpl' =>
'admin-help-datadic',
'permalink' =>
'help-datadic-uebersicht'),
56 'workflow_list' => array(
'title' =>
'Workflow Definitionen',
'tpl' =>
'admin-help-workflow-list',
'permalink' =>
'help-workflow-definitionen'),
57 'workflow_edit' => array(
'title' =>
'Workflow bearbeiten',
'tpl' =>
'admin-help-workflow-edit',
'permalink' =>
'help-workflow-bearbeiten'),
58 'workflow_binds' => array(
'title' =>
'Modul-Bindings',
'tpl' =>
'admin-help-workflow-binds',
'permalink' =>
'help-workflow-bindings'),
59 'workflow_bind_edit' => array(
'title' =>
'Binding bearbeiten',
'tpl' =>
'admin-help-workflow-bind-edit',
'permalink' =>
'help-workflow-binding-bearbeiten'),
60 'workflow_instances' => array(
'title' =>
'Workflow Instanzen',
'tpl' =>
'admin-help-workflow-instances',
'permalink' =>
'help-workflow-instanzen'),
61 'workflow_install' => array(
'title' =>
'Workflow Install',
'tpl' =>
'admin-help-workflow-install',
'permalink' =>
'help-workflow-installation'),
62 'workflow_use' => array(
'title' =>
'Workflow starten',
'tpl' =>
'admin-help-workflow-use',
'permalink' =>
'help-workflow-starten'),
63 'workflow_run' => array(
'title' =>
'Workflow ausführen',
'tpl' =>
'admin-help-workflow-run',
'permalink' =>
'help-workflow-ausfuehren'),
64 'content' => array(
'title' =>
'Content CMS — Benutzerhandbuch',
'tpl' =>
'admin-help-content',
'permalink' =>
'help-content-cms'),
65 'content_lng' => array(
'title' =>
'Sprachen & Uebersetzung — Benutzerhandbuch',
'tpl' =>
'admin-help-content-lng',
'permalink' =>
'help-content-sprachen'),
66 'user_admin' => array(
'title' =>
'Benutzer-Administration',
'tpl' =>
'admin-help-user-admin',
'permalink' =>
'help-benutzer-administration'),
67 'user_profil' => array(
'title' =>
'Mein Profil',
'tpl' =>
'admin-help-user-profil',
'permalink' =>
'help-benutzer-profil'),
68 'user_group_form' => array(
'title' =>
'Benutzergruppe',
'tpl' =>
'admin-help-user-group',
'permalink' =>
'help-benutzergruppe'),
69 'consent_privacy' => array(
'title' =>
'Datenschutz-Einstellungen',
'tpl' =>
'admin-help-consent-privacy',
'permalink' =>
'help-datenschutz-einstellungen'),
70 'impressum' => array(
'title' =>
'Impressum',
'tpl' =>
'admin-help-impressum',
'permalink' =>
'help-impressum'),
72 $texts = $this->texts();
73 foreach (
$topics as $topic => &$meta) {
74 $meta[
'title'] = $texts->get_fd_message(
'title_' . $topic);
84 $topic = trim((
string)$topic);
86 if ($topic ===
'' || !isset(
$topics[$topic])) {
91 'dashboard' => array(
'icon' =>
'bi-speedometer2',
'subtitle' =>
'Systemstatus, Datenbanken und Aktivitaeten'),
92 'cache' => array(
'icon' =>
'bi-lightning-charge',
'subtitle' =>
'Statische Content-Seiten beschleunigen'),
93 'dd_list' => array(
'icon' =>
'bi-journal-code',
'subtitle' =>
'DD-Dateien mit Datenbankstruktur abgleichen'),
94 'dd_fields' => array(
'icon' =>
'bi-list-columns',
'subtitle' =>
'Felddefinitionen vergleichen'),
95 'dd_backup' => array(
'icon' =>
'bi-archive',
'subtitle' =>
'Datenbank sichern und wiederherstellen'),
96 'db_list' => array(
'icon' =>
'bi-database',
'subtitle' =>
'Tabellen und Datensaetze verwalten'),
97 'edit_dd' => array(
'icon' =>
'bi-journal-code',
'subtitle' =>
'Tabellen-Metadaten und Felder pflegen'),
98 'edit_fd' => array(
'icon' =>
'bi-input-cursor-text',
'subtitle' =>
'Formularfelddefinitionen bearbeiten'),
99 'server' => array(
'icon' =>
'bi-hdd-network',
'subtitle' =>
'Datenbank-Server verwalten'),
100 'server_tables' => array(
'icon' =>
'bi-table',
'subtitle' =>
'Tabellen des Servers'),
101 'modules_list' => array(
'icon' =>
'bi-boxes',
'subtitle' =>
'Installierte Module verwalten'),
102 'modules_new' => array(
'icon' =>
'bi-plus-square',
'subtitle' =>
'Neues Modul anlegen'),
103 'modules_access' => array(
'icon' =>
'bi-shield-lock',
'subtitle' =>
'Zugriffsrechte pro Modul'),
104 'config' => array(
'icon' =>
'bi-gear',
'subtitle' =>
'System-Konfiguration'),
105 'session' => array(
'icon' =>
'bi-person-badge',
'subtitle' =>
'Aktive Benutzer-Sessions'),
106 'trace' => array(
'icon' =>
'bi-clock-history',
'subtitle' =>
'Aenderungshistorie'),
107 'sysmsg' => array(
'icon' =>
'bi-bell',
'subtitle' =>
'System-Meldungen'),
108 'missing' => array(
'icon' =>
'bi-file-earmark-x',
'subtitle' =>
'Fehlende Dateien'),
109 'contact' => array(
'icon' =>
'bi-envelope-check',
'subtitle' =>
'Kontaktanfragen verwalten'),
110 'user' => array(
'icon' =>
'bi-people',
'subtitle' =>
'Benutzer und Gruppen'),
111 'export_sql' => array(
'icon' =>
'bi-filetype-sql',
'subtitle' =>
'SQL-Dump exportieren'),
112 'datadic' => array(
'icon' =>
'bi-journal-code',
'subtitle' =>
'DataDic Uebersicht'),
113 'workflow_list' => array(
'icon' =>
'bi-diagram-3',
'subtitle' =>
'Workflow-Definitionen'),
114 'workflow_edit' => array(
'icon' =>
'bi-diagram-3',
'subtitle' =>
'Workflow bearbeiten'),
115 'workflow_binds' => array(
'icon' =>
'bi-plug',
'subtitle' =>
'Modul-Bindings verwalten'),
116 'workflow_bind_edit' => array(
'icon' =>
'bi-plug',
'subtitle' =>
'Binding JSON bearbeiten'),
117 'workflow_instances' => array(
'icon' =>
'bi-collection',
'subtitle' =>
'Laufende Workflow-Durchlaeufe'),
118 'workflow_install' => array(
'icon' =>
'bi-database-gear',
'subtitle' =>
'Workflow-Tabellen installieren'),
119 'workflow_use' => array(
'icon' =>
'bi-play-circle',
'subtitle' =>
'Ziel prüfen und neuen Durchlauf starten'),
120 'workflow_run' => array(
'icon' =>
'bi-list-check',
'subtitle' =>
'Schritte bearbeiten und kontrolliert abschließen'),
121 'content' => array(
'icon' =>
'bi-file-earmark-richtext',
'subtitle' =>
'Seiten, Ordner, Medien und Mehrsprachigkeit'),
122 'content_lng' => array(
'icon' =>
'bi-translate',
'subtitle' =>
'Master-Sprache, CMS-Sync, Provider und Startseite'),
123 'user_admin' => array(
'icon' =>
'bi-person-lines-fill',
'subtitle' =>
'Benutzer, Rollen und Gruppen'),
124 'user_profil' => array(
'icon' =>
'bi-person-circle',
'subtitle' =>
'Eigene Stammdaten und Oberflaeche'),
125 'user_group_form' => array(
'icon' =>
'bi-people',
'subtitle' =>
'Rollenname, Beschreibung und Aktivstatus'),
126 'consent_privacy' => array(
'icon' =>
'bi-shield-check',
'subtitle' =>
'Cookies und externe Medien'),
127 'impressum' => array(
'icon' =>
'bi-building',
'subtitle' =>
'Anbieterkennzeichnung'),
130 $extra = $icons[$topic] ?? array(
'icon' =>
'bi-grid',
'subtitle' =>
'');
132 'title' => (
string)(
$topics[$topic][
'title'] ?? $topic),
133 'icon' => (
string)($extra[
'icon'] ??
'bi-grid'),
134 'subtitle' => $this->texts()->get_fd_message(
'subtitle_' . $topic),
138 public function url($topic) {
139 return '?dbx_modul=dbxContent&dbx_run1=help&topic=' . rawurlencode((
string)$topic);
142 public function formUrl(
string $modul,
string $form,
string $title =
''): string {
143 $url =
'?dbx_modul=dbxContent&dbx_run1=help&topic=form'
144 .
'&help_modul=' . rawurlencode($modul)
145 .
'&help_form=' . rawurlencode(
$form);
146 if (trim($title) !==
'') {
147 $url .=
'&help_title=' . rawurlencode($title);
153 $topic = trim($topic);
155 $permalink = trim((
string)(
$topics[$topic][
'permalink'] ??
''));
156 if ($permalink !==
'' && preg_match(
'/^[a-z0-9]+(?:-[a-z0-9]+)*$/', $permalink)) {
159 $slug = preg_replace(
'/-+/',
'-', preg_replace(
'/[^a-z0-9-]+/',
'-', str_replace(
'_',
'-', strtolower($topic))));
160 return trim(
'help-' . trim((
string)$slug,
'-'),
'-');
164 $topic = trim((
string)$topic);
166 if ($topic ===
'' || !isset(
$topics[$topic])) {
171 return $this->tpl()->get_tpl(
'dbxAdmin|admin-help-button', array(
172 'help_url' => $this->h($this->
url($topic)),
173 'help_title' => $this->h($this->texts()->format_fd_message(
'help_prefix', array(
'title' => $meta[
'title'] ?? $topic))),
185 $modul = trim($modul);
187 $title = trim($title);
188 if (!preg_match(
'/^[a-zA-Z][a-zA-Z0-9_]*$/', $modul)
190 || !preg_match(
'/^[a-zA-Z0-9_.:-]+$/',
$form)) {
195 $title = ucwords(str_replace(array(
'-',
'_',
'.'),
' ',
$form));
198 $url = $this->formUrl($modul,
$form, $title);
199 return $this->tpl()->get_tpl(
'dbxAdmin|admin-help-button', array(
200 'help_url' => $this->h(
$url),
201 'help_title' => $this->h($this->texts()->format_fd_message(
'help_prefix', array(
'title' => $title))),
205 public function renderModuleBar($topic =
'', $actionsHtml =
'', $title =
'', $icon =
'', $subtitle =
'') {
211 return trim($this->tpl()->get_tpl(
'dbx|module-bar', $data));
218 $topic = trim((
string)$topic);
223 $meta = $this->
barMeta($topic);
224 if (!is_array($meta)) {
229 $title = (string)($meta[
'title'] ?? $topic);
232 $icon = (string)($meta[
'icon'] ??
'bi-grid');
234 if ($subtitle ===
'') {
235 $subtitle = (string)($meta[
'subtitle'] ??
'');
239 'bar_class' =>
'dbx-module-bar',
240 'bar_title_class' =>
'dbx-module-bar-titleblock',
241 'bar_actions_class' =>
'dbx-module-bar-actions',
242 'bar_title' => (
string)$title,
243 'bar_icon' => (
string)$icon,
244 'bar_subtitle' => (
string)$subtitle,
245 'bar_title_pre' =>
'',
246 'bar_title_heading_attrs' =>
'',
247 'bar_actions' => (
string)$actionsHtml,
248 'bar_extra' => $this->
button($topic),
256 $topic = trim((
string)$topic);
261 $meta = $this->
barMeta($topic);
262 if (!is_array($meta)) {
267 'bar_class' =>
'dbx-module-bar dbx-help-context-bar',
268 'bar_title_class' =>
'dbx-module-bar-titleblock',
269 'bar_actions_class' =>
'dbx-module-bar-actions',
270 'bar_title' => (
string)($meta[
'title'] ?? $topic),
271 'bar_icon' => (
string)($meta[
'icon'] ??
'bi-question-circle'),
272 'bar_subtitle' => $this->texts()->get_fd_message(
'context_help'),
273 'bar_title_pre' =>
'',
274 'bar_title_heading_attrs' =>
'',
282 $title = trim($title) !==
'' ? trim($title) : $this->texts()->get_fd_message(
'form_help');
284 'bar_class' =>
'dbx-module-bar dbx-help-context-bar',
285 'bar_title_class' =>
'dbx-module-bar-titleblock',
286 'bar_actions_class' =>
'dbx-module-bar-actions',
287 'bar_title' => $this->h($title),
288 'bar_icon' =>
'bi-question-circle',
289 'bar_subtitle' => $this->texts()->get_fd_message(
'form_help_subtitle'),
290 'bar_title_pre' =>
'',
291 'bar_title_heading_attrs' =>
'',
304 'bar_icon' =>
'bi-grid',
305 'bar_subtitle' =>
'',
306 'bar_title_pre' =>
'',
307 'bar_title_heading_attrs' =>
'',
308 'bar_class' =>
'dbx-module-bar',
309 'bar_title_class' =>
'dbx-module-bar-titleblock',
310 'bar_actions_class' =>
'dbx-module-bar-actions',
316 return array_merge($data, array(
317 'help_button' => (
string)($data[
'bar_extra'] ??
''),
322 if (!is_object($oForm) || !method_exists($oForm,
'add_obj')) {
331 $oForm->add_obj(
'help_button', $this->
button($topic));
332 if (method_exists($oForm,
'add_module_bar')) {
333 $barMeta = $this->
barMeta($topic);
334 if (is_array($barMeta) && $barMeta) {
335 $oForm->add_module_bar(
336 (
string)($barMeta[
'title'] ??
''),
337 (
string)($barMeta[
'icon'] ??
'bi-grid'),
338 (
string)($barMeta[
'subtitle'] ??
'')
346 $modul = (string)
dbx()->get_system_var(
'dbx_modul',
'');
349 $run1 = (string)
dbx()->get_modul_var(
'dbx_run1',
'',
'parameter');
352 $run2 = (string)
dbx()->get_modul_var(
'dbx_run2',
'',
'parameter');
355 $run1 = strtolower(trim($run1));
356 $run2 = strtolower(trim($run2));
358 if ($modul ===
'dbxAdmin') {
359 if ($run1 ===
'run' || $run1 ===
'dashboard' || $run1 ===
'') {
362 if ($run1 ===
'cache') {
365 if ($run1 ===
'dd') {
366 if (strpos($run2,
'field') !==
false) {
369 if ($run2 ===
'backup_db' || $run2 ===
'restore_db') {
374 if ($run1 ===
'db') {
377 if ($run1 ===
'edit_dd') {
380 if ($run1 ===
'edit_fd') {
383 if ($run1 ===
'server') {
384 return ($run2 ===
'list_tables') ?
'server_tables' :
'server';
386 if ($run1 ===
'modules') {
387 if ($run2 ===
'modul_new') {
388 return 'modules_new';
390 if ($run2 ===
'modul_access') {
391 return 'modules_access';
393 return 'modules_list';
395 if ($run1 ===
'config') {
396 $xmodul = strtolower(trim((
string)
dbx()->get_modul_var(
'xmodul',
'',
'parameter')));
397 if ($xmodul ===
'dbxcontent') {
398 return 'content_lng';
402 if ($run1 ===
'session') {
405 if ($run1 ===
'trace') {
408 if ($run1 ===
'sysmsg') {
411 if ($run1 ===
'missing') {
414 if ($run1 ===
'contact') {
417 if ($run1 ===
'user') {
420 if ($run1 ===
'export_sql') {
423 if ($run1 ===
'datadic') {
428 if ($modul ===
'dbxWorkflow_admin') {
429 if ($run1 ===
'edit') {
430 return 'workflow_edit';
432 if ($run1 ===
'edit_bind') {
433 return 'workflow_bind_edit';
435 if ($run1 ===
'binds') {
436 return 'workflow_binds';
438 if ($run1 ===
'instances') {
439 return 'workflow_instances';
441 if ($run1 ===
'install') {
442 return 'workflow_install';
444 return 'workflow_list';
447 if ($modul ===
'dbxWorkflow') {
448 if ($run1 ===
'run') {
449 return 'workflow_run';
451 return 'workflow_use';
454 if ($modul ===
'dbxContent_admin') {
455 if ($run1 ===
'content' && $run2 ===
'config') {
456 return 'content_lng';
461 if ($modul ===
'dbxUser_admin') {
462 if ($run1 ===
'user' && ($run2 ===
'new_group' || $run2 ===
'edit_group')) {
463 return 'user_group_form';
468 if ($modul ===
'dbxUser') {
469 if ($run1 ===
'user' && ($run2 ===
'edit_profil' || $run2 ===
'profil')) {
470 return 'user_profil';
478 $obj =
dbx()->get_include_obj(
'dbxContentContextHelp',
'dbxContent');
479 if (is_object($obj) && method_exists($obj,
'run')) {
attachForm($oForm, $topic='')
formUrl(string $modul, string $form, string $title='')
formHelpWindowBarTemplateData(string $title='')
moduleBarTemplateData($topic='', $actionsHtml='', $title='', $icon='', $subtitle='')
helpWindowBarTemplateData($topic='')
Bar-Daten fuer Kontext-Hilfe im Hilfe-Fenster (ohne Help-Button, ohne bar_middle).
renderModuleBar($topic='', $actionsHtml='', $title='', $icon='', $subtitle='')
resolveTopic($modul='', $run1='', $run2='')
topicPermalink(string $topic)
formButton(string $modul, string $form, string $title='')
Help-Button fuer ein konkretes dbxForm-Formular.
DBX schema administration.