forked from digedag/rn_base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
class.tx_rnbase_mod_BaseModule.php
602 lines (551 loc) · 20.6 KB
/
class.tx_rnbase_mod_BaseModule.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
<?php
use TYPO3\CMS\Core\Utility\GeneralUtility;
/***************************************************************
* Copyright notice
*
* (c) 2009-2016 Rene Nitzsche (rene@system25.de)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
tx_rnbase::load('tx_rnbase_util_TYPO3');
tx_rnbase::load('tx_rnbase_mod_IModule');
tx_rnbase::load('tx_rnbase_mod_IModFunc');
tx_rnbase::load('Tx_Rnbase_Backend_Utility');
tx_rnbase::load('tx_rnbase_util_Typo3Classes');
tx_rnbase::load('Tx_Rnbase_Backend_Utility_Icons');
tx_rnbase::load('Tx_Rnbase_Backend_Module_Base');
/**
* Fertige Implementierung eines BE-Moduls. Das Modul ist dabei nur eine Hülle für die einzelnen Modulfunktionen.
* Die Klasse stellt also lediglich eine Auswahlbox mit den verfügbaren Funktionen bereit. Neue Funktionen können
* dynamisch über die ext_tables.php angemeldet werden:
* tx_rnbase_util_Extensions::insertModuleFunction('user_txmkmailerM1', 'tx_mkmailer_mod1_FuncOverview',
* tx_rnbase_util_Extensions::extPath($_EXTKEY).'mod1/class.tx_mkmailer_mod1_FuncOverview.php',
* 'LLL:EXT:mkmailer/mod1/locallang_mod.xml:func_overview'
* );
* Die Funktionsklassen sollten das Interface tx_rnbase_mod_IModFunc implementieren. Eine Basisklasse mit nützlichen
* Methoden steht natürlich auch bereit: tx_rnbase_mod_BaseModFunc
*/
abstract class tx_rnbase_mod_BaseModule extends Tx_Rnbase_Backend_Module_Base implements tx_rnbase_mod_IModule {
public $doc;
private $configurations, $formTool;
/**
* Initializes the backend module by setting internal variables, initializing the menu.
*
* @return void
*/
public function init()
{
$GLOBALS['LANG']->includeLLFile('EXT:rn_base/mod/locallang.xml');
$this->initModConf();
parent::init();
if ($this->id === 0) {
$this->id = $this->getConfigurations()->getInt('_cfg.fallbackPid');
}
}
/**
* Initializes the mconf of this module
*
* @return void
*/
protected function initModConf()
{
// Name might be set from outside
if (!$this->MCONF['name']) {
$this->MCONF = $GLOBALS['MCONF'];
}
// check dispatch mode calls without rnbase module runner and fetch the config.
if (!$this->MCONF['name']) {
/* @var $runner Tx_Rnbase_Backend_ModuleRunner */
$runner = tx_rnbase::makeInstance('Tx_Rnbase_Backend_ModuleRunner');
$runner->initTargetConf($this);
}
}
/**
* For the new TYPO3 request handlers
*
* @param \Psr\Http\Message\ServerRequestInterface $request
* @param \Psr\Http\Message\ResponseInterface $response = null
*
* @return boolean TRUE, if the request request could be dispatched
*/
public function __invoke(
/* Psr\Http\Message\ServerRequestInterface */ $request = null,
/* Psr\Http\Message\ResponseInterface */ $response = null
)
{
$GLOBALS['MCONF']['script'] = '_DISPATCH';
$this->init();
$this->main();
$this->printContent();
return true;
}
/**
* Main function of the module. Write the content to $this->content
* If you chose "web" as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree
*
* @return [type] ...
*/
public function main() {
// Einbindung der Modul-Funktionen
$this->checkExtObj();
// Access check!
// The page will show only if there is a valid page and if this page may be viewed by the user
$this->pageinfo = Tx_Rnbase_Backend_Utility::readPageAccess($this->getPid(), $this->perms_clause);
$this->initDoc($this->getDoc());
if ($this->useModuleTemplate()) {
$this->setContentThroughModuleTemplate();
} else {
$this->setContentThroughDocumentTemplate();
}
}
/**
* @return boolean
*/
protected function useModuleTemplate() {
return FALSE;
}
/**
* Der Weg bis TYPO3 6.2
* @return void
*/
protected function setContentThroughDocumentTemplate() {
global $BE_USER;
$markers = array();
$this->content .= $this->moduleContent(); // Muss vor der Erstellung des Headers geladen werden
$this->content .= $this->getDoc()->sectionEnd(); // Zur Sicherheit eine offene Section schließen
$header = $this->getDoc()->header($GLOBALS['LANG']->getLL('title'));
$this->content = $this->content; // ??
// ShortCut
if ($BE_USER->mayMakeShortcut()) {
$this->content .= $this->getDoc()->spacer(20) . $this->getDoc()->section(
'',
$this->getDoc()->makeShortcutIcon(
'id',
implode(',', array_keys($this->MOD_MENU)),
$this->getName()
)
);
}
$this->content.=$this->getDoc()->spacer(10);
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markers['CSH'] = $docHeaderButtons['csh'];
$markers['HEADER'] = $header;
$markers['SELECTOR'] = $this->selector ? $this->selector : $this->subselector; // SubSelector is deprecated!!
// Das FUNC_MENU enthält die Modul-Funktionen, die per ext_tables.php registriert werden
$markers['FUNC_MENU'] = $this->getFuncMenu();
// SUBMENU sind zusätzliche Tabs die eine Modul-Funktion bei Bedarf einblenden kann.
$markers['SUBMENU'] = $this->tabs;
$markers['TABS'] = $this->tabs; // Deprecated use ###SUBMENU###
$markers['CONTENT'] = $this->content;
$content = $this->getDoc()->startPage($GLOBALS['LANG']->getLL('title'));
$content.= $this->getDoc()->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
$this->content = $this->getDoc()->insertStylesAndJS($content);
}
/**
* der Weg ab TYPO3 7.6
* @return void
*/
protected function setContentThroughModuleTemplate() {
/* @var $moduleTemplate TYPO3\CMS\Backend\Template\ModuleTemplate */
$moduleTemplate = tx_rnbase::makeInstance('TYPO3\\CMS\\Backend\\Template\\ModuleTemplate');
$moduleTemplate->getPageRenderer()->loadJquery();
$moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
// @TODO das Menü ist nicht funktionell. Weder werden die Locallang Labels
// ersetzt, noch funktioniert der onChange Event
$moduleTemplate->registerModuleMenu($this->getName());
// @TODO Shorticon wie in alter Version einfügen
$content = $moduleTemplate->header($GLOBALS['LANG']->getLL('title'));
// muss vor dem einfügen der Tabs aufgerufen werden, da die Tabs sonst leer bleiben
$this->moduleContent();
$content .= $moduleTemplate->section('', $this->tabs, FALSE, FALSE, 0, TRUE);
$content .= $moduleTemplate->section('', $this->moduleContent(), FALSE, FALSE, 0, TRUE);
// Workaround: jumpUrl wieder einfügen
// @TODO Weg finden dass ohne das DocumentTemplate zu machen
$content .= '<!--###POSTJSMARKER###-->';
$content = $this->getDoc()->insertStylesAndJS($content);
// @TODO haupttemplate eines BE moduls enthält evtl. JS/CSS etc.
// das wurde bisher über das DocumentTemplate eingefügt, was jetzt
// nicht mehr geht. Dafür muss ein Weg gefunden werden.
$moduleTemplate->setContent($content);
$this->content = $moduleTemplate->renderContent();
}
/**
* Returns the module ident name
* @return string
*/
public function getName() {
return $this->MCONF['name'];
}
/**
* Generates the module content.
* Normaly we would call $this->extObjContent(); But this method writes the output to $this->content. We need
* the output directly so this is reimplementation of extObjContent()
*
* @return string
*/
protected function moduleContent() {
// Dummy-Button für automatisch Submit
$content = '<p style="position:absolute; top:-5000px; left:-5000px;">'
. '<input type="submit" />'
. '</p>';
$this->extObj->pObj = &$this; // Wozu diese Zuweisung? Die Submodule können getModule() verwenden...
if (is_callable(array($this->extObj, 'main'))) $content.=$this->extObj->main();
else $content .= 'Module '.get_class($this->extObj).' has no method main.';
return $content;
}
/**
* (non-PHPdoc)
* @see t3lib_SCbase::checkExtObj()
*/
public function checkExtObj() {
if (is_array($this->extClassConf) && $this->extClassConf['name']) {
$this->extObj = tx_rnbase::makeInstance($this->extClassConf['name']);
$this->extObj->init($this, $this->extClassConf);
// Re-write:
tx_rnbase::load('tx_rnbase_parameters');
$this->MOD_SETTINGS = Tx_Rnbase_Backend_Utility::getModuleData(
$this->MOD_MENU,
tx_rnbase_parameters::getPostOrGetParameter('SET'),
$this->getName(),
$this->modMenu_type,
$this->modMenu_dontValidateList,
$this->modMenu_setDefaultList
);
}
}
/**
* @see tx_rnbase_mod_IModule::getFormTool()
* @return tx_rnbase_util_FormTool
*/
public function getFormTool() {
if(!$this->formTool) {
$this->formTool = tx_rnbase::makeInstance(
Tx_Rnbase_Backend_Utility::isDispatchMode()
? 'Tx_Rnbase_Backend_Form_ToolBox'
: 'tx_rnbase_util_FormTool'
);
$this->formTool->init($this->getDoc(), $this);
}
return $this->formTool;
}
/**
* Liefert eine Instanz von tx_rnbase_configurations. Da wir uns im BE bewegen, wird diese mit einem
* Config-Array aus der TSConfig gefüttert. Dabei wird die Konfiguration unterhalb von mod.extkey. genommen.
* Für "extkey" wird der Wert der Methode getExtensionKey() verwendet.
* Zusätzlich wird auch die Konfiguration von "lib." bereitgestellt.
* Wenn Daten für BE-Nutzer oder Gruppen überschrieben werden sollen, dann darauf achten, daß die
* Konfiguration mit "page." beginnen muss. Also bspw. "page.lib.test = 42".
*
* Ein eigenes TS-Template für das BE wird in der ext_localconf.php mit dieser Anweisung eingebunden:
* tx_rnbase_util_Extensions::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:myext/mod1/pageTSconfig.txt">');
* @return tx_rnbase_configurations
*/
public function getConfigurations() {
if(!$this->configurations) {
tx_rnbase::load('tx_rnbase_configurations');
tx_rnbase::load('tx_rnbase_util_Misc');
tx_rnbase::load('tx_rnbase_util_Typo3Classes');
tx_rnbase_util_Misc::prepareTSFE(); // Ist bei Aufruf aus BE notwendig!
$cObj = tx_rnbase::makeInstance(tx_rnbase_util_Typo3Classes::getContentObjectRendererClass());
$pageTSconfigFull = Tx_Rnbase_Backend_Utility::getPagesTSconfig($this->getPid());
$pageTSconfig = $pageTSconfigFull['mod.'][$this->getExtensionKey().'.'];
$pageTSconfig['lib.'] = $pageTSconfigFull['lib.'];
$userTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.' . $this->getExtensionKey().'.');
if (!empty($userTSconfig['properties'])) {
tx_rnbase::load('tx_rnbase_util_Arrays');
$pageTSconfig = tx_rnbase_util_Arrays::mergeRecursiveWithOverrule($pageTSconfig, $userTSconfig['properties']);
}
$qualifier = $pageTSconfig['qualifier'] ? $pageTSconfig['qualifier'] : $this->getExtensionKey();
$this->configurations = new tx_rnbase_configurations();
$this->configurations->init($pageTSconfig, $cObj, $this->getExtensionKey(), $qualifier);
// init the parameters object
$this->configurations->setParameters(
tx_rnbase::makeInstance('tx_rnbase_parameters')
);
$this->configurations->getParameters()->init('SET');
}
return $this->configurations;
}
/**
* Liefert bei Web-Modulen die aktuelle Pid
* @return int
*/
public function getPid() {
return $this->id;
}
public function setSubMenu($menuString) {
$this->tabs = $menuString;
}
/**
* Selector String for the marker ###SELECTOR###
* @param $selectorString
*/
public function setSelector($selectorString){
$this->selector = $selectorString;
}
/**
* Prints out the module HTML
*
* @return void
*/
function printContent() {
$this->content.=$this->getDoc()->endPage();
$params = $markerArray = $subpartArray = $wrappedSubpartArray = Array();
tx_rnbase::load('tx_rnbase_util_BaseMarker');
tx_rnbase::load('tx_rnbase_util_Templates');
tx_rnbase_util_BaseMarker::callModules($this->content, $markerArray, $subpartArray, $wrappedSubpartArray, $params, $this->getConfigurations()->getFormatter());
$content = tx_rnbase_util_Templates::substituteMarkerArrayCached($this->content, $markerArray, $subpartArray, $wrappedSubpartArray);
echo $content;
}
/**
* Returns a template instance
* Liefert die Instanzvariable doc. Die muss immer Public bleiben, weil auch einige TYPO3-Funktionen
* direkt darauf zugreifen.
* @return template
*/
public function getDoc() {
if(!$this->doc) {
if (isset($GLOBALS['TBE_TEMPLATE'])) {
$this->doc = $GLOBALS['TBE_TEMPLATE'];
} else {
$this->doc = tx_rnbase::makeInstance(
tx_rnbase_util_Typo3Classes::getDocumentTemplateClass()
);
}
}
return $this->doc;
}
/**
* Erstellt das Menu mit den Submodulen. Die ist als Auswahlbox oder per Tabs möglich und kann per TS eingestellt werden:
* mod.mymod._cfg.funcmenu.useTabs
*/
protected function getFuncMenu() {
$items = $this->getFuncMenuItems($this->MOD_MENU['function']);
$useTabs = intval($this->getConfigurations()->get('_cfg.funcmenu.useTabs')) > 0;
if($useTabs)
$menu = $this->getFormTool()->showTabMenu($this->getPid(), 'function', $this->getName(), $items);
else
$menu = $this->getFormTool()->showMenu($this->getPid(), 'function', $this->getName(), $items, $this->getModuleScript());
return $menu['menu'];
}
/**
* index.php or empty
* @return string
*/
protected function getModuleScript() {
return '';
}
/**
* Find out all visible sub modules for the current user.
* mod.mymod._cfg.funcmenu.deny = className of submodules
* mod.mymod._cfg.funcmenu.allow = className of submodules
* @param array $items
* @return array
*/
protected function getFuncMenuItems($items) {
$visibleItems = $items;
if($denyItems = $this->getConfigurations()->get('_cfg.funcmenu.deny')) {
$denyItems = tx_rnbase_util_Strings::trimExplode(',', $denyItems);
foreach ($denyItems As $item)
unset($visibleItems[$item]);
}
if($allowItems = $this->getConfigurations()->get('_cfg.funcmenu.allow')) {
$visibleItems = array();
$allowItems = tx_rnbase_util_Strings::trimExplode(',', $allowItems);
foreach ($allowItems As $item)
$visibleItems[$item] = $items[$item];
}
return $visibleItems;
}
/**
* Builds the form open tag
*
* @TODO: per TS einstellbar machen
*
* @return string
*/
protected function getFormTag()
{
$modUrl = Tx_Rnbase_Backend_Utility::getModuleUrl(
$this->getName(),
array(
'id' => $this->getPid()
),
''
);
return '<form action="' . $modUrl . '" method="post" enctype="multipart/form-data">';
}
/**
* Returns the file for module HTML template. This can be overwritten.
* The first place to search for template is EXT:[your_ext_key]/mod1/template.html. If this file
* not exists the default from rn_base is used. Overwrite this method to set your own location.
* @return string
*/
protected function getModuleTemplate() {
$filename = $this->getConfigurations()->get('template');
if(file_exists(tx_rnbase_util_Files::getFileAbsFileName($filename, TRUE, TRUE))) {
return $filename;
}
$filename = 'EXT:'.$this->getExtensionKey() . '/mod1/template.html';
if(file_exists(tx_rnbase_util_Files::getFileAbsFileName($filename, TRUE, TRUE))) {
return $filename;
}
return 'EXT:rn_base/mod/template.html';
}
protected function initDoc($doc) {
$doc->backPath = $GLOBALS['BACK_PATH'];
$doc->form= $this->getFormTag();
$doc->docType = 'xhtml_trans';
$doc->inDocStyles = $this->getDocStyles();
$doc->inDocStylesArray[] = $doc->inDocStyles;
$doc->tableLayout = $this->getTableLayout();
$doc->setModuleTemplate($this->getModuleTemplate());
$doc->loadJavascriptLib('contrib/prototype/prototype.js');
// JavaScript
$doc->JScode .= '
<script language="javascript" type="text/javascript">
script_ended = 0;
function jumpToUrl(URL) {
document.location = URL;
}
</script>
';
// TODO: Die Zeile könnte problematisch sein...
$doc->postCode='
<script language="javascript" type="text/javascript">
script_ended = 1;
if (top.fsMod) top.fsMod.recentIds["web"] = ' . $this->id . ';</script>';
}
/**
* Liefert den Extension-Key des Moduls
* @return string
*/
abstract function getExtensionKey();
protected function getDocStyles() {
$css .= '
.rnbase_selector div {
float:left;
margin: 0 5px 10px 0;
}
.rnbase_content div {
float:left;
margin: 5px 5px 10px 0;
}
.cleardiv {clear:both;}
.rnbase_content .c-headLineTable td {
font-weight:bold;
color:#FFF!important;
}';
return $css;
}
/**
* @deprecated use mod_Tables
* @return multitype:multitype:string multitype:multitype:string
*/
public function getTableLayout() {
return Array (
'table' => Array('<table class="typo3-dblist" width="100%" cellspacing="0" cellpadding="0" border="0">', '</table><br/>'),
'0' => Array( // Format für 1. Zeile
'tr' => Array('<tr class="t3-row-header c-headLineTable">', '</tr>'),
// Format für jede Spalte in der 1. Zeile
'defCol' => array('<td>', '</td>')
),
'defRow' => Array ( // Formate für alle Zeilen
'tr' => Array('<tr class="db_list_normal">', '</tr>'),
'defCol' => Array('<td>', '</td>') // Format für jede Spalte in jeder Zeile
),
'defRowEven' => Array ( // Formate für alle geraden Zeilen
'tr' => Array('<tr class="db_list_alt">', '</tr>'),
// Format für jede Spalte in jeder Zeile
'defCol' => array('<td>', '</td>')
)
);
}
/**
* Create the panel of buttons for submitting the form or otherwise perform operations.
*
* @return array all available buttons as an assoc. array
*/
function getButtons() {
global $BACK_PATH, $BE_USER;
$buttons = array(
'csh' => '',
'view' => '',
'record_list' => '',
'shortcut' => '',
);
// TODO: CSH
$buttons['csh'] = Tx_Rnbase_Backend_Utility::cshItem(
'_MOD_' . $this->getName(),
'',
$GLOBALS['BACK_PATH'],
'',
TRUE
);
if($this->id && is_array($this->pageinfo)) {
// View page
$buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(Tx_Rnbase_Backend_Utility::viewOnClick($this->pageinfo['uid'], $BACK_PATH, Tx_Rnbase_Backend_Utility::BEgetRootLine($this->pageinfo['uid']))) . '">' .
'<img' . Tx_Rnbase_Backend_Utility_Icons::skinImg($BACK_PATH, 'gfx/zoom.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
'</a>';
// Shortcut
if ($BE_USER->mayMakeShortcut()) {
$buttons['shortcut'] = $this->getDoc()->makeShortcutIcon(
'id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit',
implode(',', array_keys($this->MOD_MENU)),
$this->getName()
);
}
// If access to Web>List for user, then link to that module.
if ($BE_USER->check('modules', 'web_list')) {
$href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(tx_rnbase_util_Misc::getIndpEnv('REQUEST_URI'));
$buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
'<img' . Tx_Rnbase_Backend_Utility_Icons::skinImg($BACK_PATH, 'gfx/list.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
'</a>';
}
}
return $buttons;
}
/**
* (Non PHP-doc)
* @deprecated use tx_rnbase_util_Misc::addFlashMessage instead
*/
public function addMessage($message, $title = '', $severity = 0, $storeInSession = FALSE) {
tx_rnbase_util_Misc::addFlashMessage($message, $title, $severity, $storeInSession);
}
/**
* @see TYPO3\CMS\Backend\Utility\BackendUtility::getLinkToDataHandlerAction
* @see TYPO3\CMS\Backend\Template\DocumentTemplate::issueCommand
* @see template::issueCommand
*
* @param string $getParameters
* @param string $redirectUrl
* @return string
*/
public function issueCommand($getParameters, $redirectUrl = '') {
if (tx_rnbase_util_TYPO3::isTYPO76OrHigher()) {
$link = TYPO3\CMS\Backend\Utility\BackendUtility::getLinkToDataHandlerAction($getParameters, $redirectUrl);
} else {
$link = $this->getDoc()->issueCommand($getParameters, $redirectUrl);
}
return $link;
}
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rn_base/mod/class.tx_rnbase_mod_BaseModule.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rn_base/mod/class.tx_rnbase_mod_BaseModule.php']);
}