NewContentElementController.php 19.4 KB
Newer Older
1
2
3
<?php
namespace TYPO3\CMS\Backend\Controller\ContentElement;

4
/*
5
 * This file is part of the TYPO3 CMS project.
6
 *
7
8
9
 * It is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License, either version 2
 * of the License, or any later version.
10
 *
11
12
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
13
 *
14
15
 * The TYPO3 project - inspiring people to share!
 */
16

17
18
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
Nicole Cordes's avatar
Nicole Cordes committed
19
use TYPO3\CMS\Backend\Utility\BackendUtility;
20
21
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
22
23
use TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider;
use TYPO3\CMS\Core\Imaging\IconRegistry;
Nicole Cordes's avatar
Nicole Cordes committed
24
use TYPO3\CMS\Core\Utility\GeneralUtility;
25
use TYPO3\CMS\Core\Utility\StringUtility;
Nicole Cordes's avatar
Nicole Cordes committed
26

27
28
29
/**
 * Script Class for the New Content element wizard
 */
30
class NewContentElementController {
31
32

	/**
33
34
	 * Page id
	 *
35
	 * @var int
36
37
38
39
	 */
	public $id;

	/**
40
41
	 * Sys language
	 *
42
	 * @var int
43
44
45
46
	 */
	public $sys_language = 0;

	/**
47
48
	 * Return URL.
	 *
49
	 * @var string
50
51
52
53
	 */
	public $R_URI = '';

	/**
54
55
	 * If set, the content is destined for a specific column.
	 *
56
	 * @var int|null
57
58
59
60
	 */
	public $colPos;

	/**
61
	 * @var int
62
63
64
65
	 */
	public $uid_pid;

	/**
66
67
	 * Module TSconfig.
	 *
68
	 * @var array
69
70
71
72
73
74
	 */
	public $modTSconfig = array();

	/**
	 * Internal backend template object
	 *
75
	 * @var \TYPO3\CMS\Backend\Template\DocumentTemplate
76
77
78
79
	 */
	public $doc;

	/**
80
81
	 * Used to accumulate the content of the module.
	 *
82
	 * @var string
83
84
85
86
	 */
	public $content;

	/**
87
88
	 * Access boolean.
	 *
89
	 * @var bool
90
91
92
93
	 */
	public $access;

	/**
94
95
	 * config of the wizard
	 *
96
	 * @var array
97
98
99
	 */
	public $config;

100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
	/**
	 * @var array
	 */
	protected $pageInfo;

	/**
	 * @var array
	 */
	protected $elementWrapper;

	/**
	 * @var string
	 */
	protected $onClickEvent;

	/**
	 * @var array
	 */
	protected $MCONF;

120
121
122
123
124
	/**
	 * @var IconFactory
	 */
	protected $iconFactory;

125
126
127
128
129
130
131
132
	/**
	 * Constructor
	 */
	public function __construct() {
		$GLOBALS['SOBE'] = $this;
		$this->init();
	}

133
134
135
136
137
138
	/**
	 * Constructor, initializing internal variables.
	 *
	 * @return void
	 */
	public function init() {
139
140
		$lang = $this->getLanguageService();
		$lang->includeLLFile('EXT:lang/locallang_misc.xlf');
141
		$LOCAL_LANG_orig = $GLOBALS['LOCAL_LANG'];
Wouter Wolters's avatar
Wouter Wolters committed
142
		$lang->includeLLFile('EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf');
143
144
145
		\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($LOCAL_LANG_orig, $GLOBALS['LOCAL_LANG']);
		$GLOBALS['LOCAL_LANG'] = $LOCAL_LANG_orig;

146
		// Setting internal vars:
147
148
		$this->id = (int)GeneralUtility::_GP('id');
		$this->sys_language = (int)GeneralUtility::_GP('sys_language_uid');
Nicole Cordes's avatar
Nicole Cordes committed
149
		$this->R_URI = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
150
		$this->colPos = GeneralUtility::_GP('colPos') === NULL ? NULL : (int)GeneralUtility::_GP('colPos');
151
		$this->uid_pid = (int)GeneralUtility::_GP('uid_pid');
152
		$this->MCONF['name'] = 'xMOD_db_new_content_el';
Nicole Cordes's avatar
Nicole Cordes committed
153
154
		$this->modTSconfig = BackendUtility::getModTSconfig($this->id, 'mod.wizards.newContentElement');
		$config = BackendUtility::getPagesTSconfig($this->id);
155
156
		$this->config = $config['mod.']['wizards.']['newContentElement.'];
		// Starting the document template object:
157
		$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
158
		$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_new_content_el.html');
159
160
161
162
163
		$this->doc->JScode = '';
		$this->doc->form = '<form action="" name="editForm"><input type="hidden" name="defValues" value="" />';
		// Setting up the context sensitive menu:
		$this->doc->getContextMenuCode();
		// Getting the current page and receiving access information (used in main())
164
165
166
		$perms_clause = $this->getBackendUser()->getPagePermsClause(1);
		$this->pageInfo = BackendUtility::readPageAccess($this->id, $perms_clause);
		$this->access = is_array($this->pageInfo) ? 1 : 0;
167
168

		$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
169
170
	}

171
172
173
174
	/**
	 * Injects the request object for the current request or subrequest
	 * As this controller goes only through the main() method, it is rather simple for now
	 *
175
176
177
	 * @param ServerRequestInterface $request the current request
	 * @param ResponseInterface $response
	 * @return ResponseInterface the response with the content
178
	 */
179
	public function mainAction(ServerRequestInterface $request, ResponseInterface $response) {
180
181
182
183
184
185
		$this->main();

		$response->getBody()->write($this->content);
		return $response;
	}

186
187
188
189
190
191
	/**
	 * Creating the module output.
	 *
	 * @return void
	 */
	public function main() {
192
		$lang = $this->getLanguageService();
193
194
		if ($this->id && $this->access) {
			// Init position map object:
195
			$posMap = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\View\ContentCreationPagePositionMap::class);
196
197
			$posMap->cur_sys_language = $this->sys_language;
			// If a column is pre-set:
198
			if (isset($this->colPos)) {
199
200
201
202
203
204
205
206
207
208
209
210
211
				if ($this->uid_pid < 0) {
					$row = array();
					$row['uid'] = abs($this->uid_pid);
				} else {
					$row = '';
				}
				$this->onClickEvent = $posMap->onClickInsertRecord($row, $this->colPos, '', $this->uid_pid, $this->sys_language);
			} else {
				$this->onClickEvent = '';
			}
			// ***************************
			// Creating content
			// ***************************
212
			$this->content .= $this->doc->header($lang->getLL('newContentElement'));
213
			// Wizard
214
			$wizardItems = $this->wizardArray();
215
			// Wrapper for wizards
216
			$this->elementWrapper['section'] = array('', '');
217
218
219
			// Hook for manipulating wizardItems, wrapper, onClickEvent etc.
			if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'])) {
				foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'] as $classData) {
Nicole Cordes's avatar
Nicole Cordes committed
220
					$hookObject = GeneralUtility::getUserObj($classData);
221
					if (!$hookObject instanceof \TYPO3\CMS\Backend\Wizard\NewContentElementWizardHookInterface) {
222
						throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Backend\Wizard\NewContentElementWizardHookInterface::class, 1227834741);
223
224
225
226
227
					}
					$hookObject->manipulateWizardItems($wizardItems, $this);
				}
			}
			// Add document inline javascript
228
			$this->doc->JScode = $this->doc->wrapScriptTags('
229
				function goToalt_doc() {	//
230
					' . $this->onClickEvent . '
231
232
233
234
235
236
237
238
				}

				if(top.refreshMenu) {
					top.refreshMenu();
				} else {
					top.TYPO3ModuleMenu.refreshMenu();
				}
			');
239
240
241

			$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class);

242
243
244
245
246
247
248
249
250
251
252
253
254
			// Traverse items for the wizard.
			// An item is either a header or an item rendered with a radio button and title/description and icon:
			$cc = ($key = 0);
			$menuItems = array();
			foreach ($wizardItems as $k => $wInfo) {
				if ($wInfo['header']) {
					$menuItems[] = array(
						'label' => htmlspecialchars($wInfo['header']),
						'content' => $this->elementWrapper['section'][0]
					);
					$key = count($menuItems) - 1;
				} else {
					$content = '';
255
256
257

					if (!$this->onClickEvent) {
						// Radio button:
258
						$oC = 'document.editForm.defValues.value=unescape(' . GeneralUtility::quoteJSvalue(rawurlencode($wInfo['params'])) . ');goToalt_doc();' . (!$this->onClickEvent ? 'window.location.hash=\'#sel2\';' : '');
259
						$content .= '<div class="media-left"><input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($oC) . '" /></div>';
260
261
262
						// Onclick action for icon/title:
						$aOnClick = 'document.getElementsByName(\'tempB\')[' . $cc . '].checked=1;' . $oC . 'return false;';
					} else {
263
						$aOnClick = "document.editForm.defValues.value=unescape('" . rawurlencode($wInfo['params']) . "');goToalt_doc();" . (!$this->onClickEvent?"window.location.hash='#sel2';":'');
264
265
					}

266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
					if (isset($wInfo['icon'])) {
						GeneralUtility::deprecationLog('The PageTS-Config: mod.wizards.newContentElement.wizardItems.*.elements.*.icon'
							. ' is deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8.'
							. ' Register your icon in IconRegistry::registerIcon and use the new setting:'
							. ' mod.wizards.newContentElement.wizardItems.*.elements.*.iconIdentifier'
						);
						$wInfo['iconIdentifier'] = 'content-' . $k;
						$icon = $wInfo['icon'];
						if (StringUtility::beginsWith($icon, '../typo3conf/ext/')) {
							$icon = str_replace('../typo3conf/ext/', 'EXT:', $icon);
						}
						if (!StringUtility::beginsWith($icon, 'EXT:') && strpos($icon, '/') !== FALSE) {
							$icon = TYPO3_mainDir . GeneralUtility::resolveBackPath($wInfo['icon']);
						}
						$iconRegistry->registerIcon($wInfo['iconIdentifier'], BitmapIconProvider::class, array(
							'source' => $icon
						));
283
					}
284
					$icon = $this->iconFactory->getIcon($wInfo['iconIdentifier'])->render();
285
286
					$menuItems[$key]['content'] .= '
						<div class="media">
287
288
289
							<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
								' . $content . '
								<div class="media-left">
290
									' . $icon . '
291
292
293
294
295
296
297
								</div>
								<div class="media-body">
									<strong>' . htmlspecialchars($wInfo['title']) . '</strong>' .
									'<br />' .
									nl2br(htmlspecialchars(trim($wInfo['description']))) .
								'</div>
							</a>
298
						</div>';
299
300
301
302
303
304
305
					$cc++;
				}
			}
			// Add closing section-tag
			foreach ($menuItems as $key => $val) {
				$menuItems[$key]['content'] .= $this->elementWrapper['section'][1];
			}
306
307
308
			// Add the wizard table to the content, wrapped in tabs
			$code = '<p>' . $lang->getLL('sel1', 1) . '</p>' . $this->doc->getDynamicTabMenu($menuItems, 'new-content-element-wizard');

309
			$this->content .= $this->doc->section(!$this->onClickEvent ? $lang->getLL('1_selectType') : '', $code, 0, 1);
310
311
312
313
314
			// If the user must also select a column:
			if (!$this->onClickEvent) {
				// Add anchor "sel2"
				$this->content .= $this->doc->section('', '<a name="sel2"></a>');
				// Select position
315
				$code = '<p>' . $lang->getLL('sel2', 1) . '</p>';
316

317
				// Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
318
				$colPosArray = GeneralUtility::callUserFunction(\TYPO3\CMS\Backend\View\BackendLayoutView::class . '->getColPosListItemsParsed', $this->id, $this);
319
				$colPosIds = array_column($colPosArray, 1);
320
				// Removing duplicates, if any
321
				$colPosList = implode(',', array_unique(array_map('intval', $colPosIds)));
322
323
				// Finally, add the content of the column selector to the content:
				$code .= $posMap->printContentElementColumns($this->id, 0, $colPosList, 1, $this->R_URI);
324
				$this->content .= $this->doc->section($lang->getLL('2_selectPosition'), $code, 0, 1);
325
326
327
328
			}
		} else {
			// In case of no access:
			$this->content = '';
329
			$this->content .= $this->doc->header($lang->getLL('newContentElement'));
330
331
332
333
334
335
336
			$this->content .= $this->doc->spacer(5);
		}
		// Setting up the buttons and markers for docheader
		$docHeaderButtons = $this->getButtons();
		$markers['CSH'] = $docHeaderButtons['csh'];
		$markers['CONTENT'] = $this->content;
		// Build the <body> for the module
337
338
		$this->content = $this->doc->startPage($lang->getLL('newContentElement'));
		$this->content .= $this->doc->moduleBody($this->pageInfo, $docHeaderButtons, $markers);
339
340
341
342
343
344
345
346
347
		$this->content .= $this->doc->sectionEnd();
		$this->content .= $this->doc->endPage();
		$this->content = $this->doc->insertStylesAndJS($this->content);
	}

	/**
	 * Print out the accumulated content:
	 *
	 * @return void
348
	 * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use mainAction() instead
349
350
	 */
	public function printContent() {
351
		GeneralUtility::logDeprecatedFunction();
352
353
354
355
356
357
358
359
360
361
362
363
364
365
		echo $this->content;
	}

	/**
	 * Create the panel of buttons for submitting the form or otherwise perform operations.
	 *
	 * @return array All available buttons as an assoc. array
	 */
	protected function getButtons() {
		$buttons = array(
			'csh' => '',
			'back' => ''
		);
		if ($this->id && $this->access) {
Benni Mack's avatar
Benni Mack committed
366
			$buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'new_ce');
367
			if ($this->R_URI) {
368
				$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL)->render() . '</a>';
369
370
371
372
373
374
375
376
377
378
379
380
381
382
			}
		}
		return $buttons;
	}

	/***************************
	 *
	 * OTHER FUNCTIONS:
	 *
	 ***************************/
	/**
	 * Returns the content of wizardArray() function...
	 *
	 * @return array Returns the content of wizardArray() function...
383
	 * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use "wizardArray()" directly
384
385
	 */
	public function getWizardItems() {
386
		GeneralUtility::logDeprecatedFunction();
387
388
389
390
391
392
393
394
395
396
		return $this->wizardArray();
	}

	/**
	 * Returns the array of elements in the wizard display.
	 * For the plugin section there is support for adding elements there from a global variable.
	 *
	 * @return array
	 */
	public function wizardArray() {
397
		$wizardItems = array();
398
399
		if (is_array($this->config)) {
			$wizards = $this->config['wizardItems.'];
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
			$appendWizards = $this->wizard_appendWizards($wizards['elements.']);
			if (is_array($wizards)) {
				foreach ($wizards as $groupKey => $wizardGroup) {
					$groupKey = rtrim($groupKey, '.');
					$showItems = GeneralUtility::trimExplode(',', $wizardGroup['show'], TRUE);
					$showAll = $wizardGroup['show'] === '*';
					$groupItems = array();
					if (is_array($appendWizards[$groupKey . '.']['elements.'])) {
						$wizardElements = array_merge((array)$wizardGroup['elements.'], $appendWizards[$groupKey . '.']['elements.']);
					} else {
						$wizardElements = $wizardGroup['elements.'];
					}
					if (is_array($wizardElements)) {
						foreach ($wizardElements as $itemKey => $itemConf) {
							$itemKey = rtrim($itemKey, '.');
							if ($showAll || in_array($itemKey, $showItems)) {
								$tmpItem = $this->wizard_getItem($groupKey, $itemKey, $itemConf);
								if ($tmpItem) {
									$groupItems[$groupKey . '_' . $itemKey] = $tmpItem;
								}
420
421
422
							}
						}
					}
423
					if (!empty($groupItems)) {
424
425
426
						$wizardItems[$groupKey] = $this->wizard_getGroupHeader($groupKey, $wizardGroup);
						$wizardItems = array_merge($wizardItems, $groupItems);
					}
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
				}
			}
		}
		// Remove elements where preset values are not allowed:
		$this->removeInvalidElements($wizardItems);
		return $wizardItems;
	}

	/**
	 * @param mixed $wizardElements
	 * @return array
	 */
	public function wizard_appendWizards($wizardElements) {
		if (!is_array($wizardElements)) {
			$wizardElements = array();
		}
		if (is_array($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'])) {
			foreach ($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'] as $class => $path) {
				require_once $path;
Nicole Cordes's avatar
Nicole Cordes committed
446
				$modObj = GeneralUtility::makeInstance($class);
447
448
449
450
451
452
453
454
455
456
457
458
459
				$wizardElements = $modObj->proc($wizardElements);
			}
		}
		$returnElements = array();
		foreach ($wizardElements as $key => $wizardItem) {
			preg_match('/^[a-zA-Z0-9]+_/', $key, $group);
			$wizardGroup = $group[0] ? substr($group[0], 0, -1) . '.' : $key;
			$returnElements[$wizardGroup]['elements.'][substr($key, strlen($wizardGroup)) . '.'] = $wizardItem;
		}
		return $returnElements;
	}

	/**
460
461
	 * @param string $groupKey Not used
	 * @param string $itemKey Not used
462
463
464
465
	 * @param array $itemConf
	 * @return array
	 */
	public function wizard_getItem($groupKey, $itemKey, $itemConf) {
466
467
		$itemConf['title'] = $this->getLanguageService()->sL($itemConf['title']);
		$itemConf['description'] = $this->getLanguageService()->sL($itemConf['description']);
468
469
470
471
472
473
		$itemConf['tt_content_defValues'] = $itemConf['tt_content_defValues.'];
		unset($itemConf['tt_content_defValues.']);
		return $itemConf;
	}

	/**
474
	 * @param string $groupKey Not used
475
476
477
478
479
	 * @param array $wizardGroup
	 * @return array
	 */
	public function wizard_getGroupHeader($groupKey, $wizardGroup) {
		return array(
480
			'header' => $this->getLanguageService()->sL($wizardGroup['header'])
481
482
483
484
485
		);
	}

	/**
	 * Checks the array for elements which might contain unallowed default values and will unset them!
486
487
	 * Looks for the "tt_content_defValues" key in each element and if found it will traverse that array as fieldname / value pairs and check.
	 * The values will be added to the "params" key of the array (which should probably be unset or empty by default).
488
489
490
491
492
493
494
	 *
	 * @param array $wizardItems Wizard items, passed by reference
	 * @return void
	 */
	public function removeInvalidElements(&$wizardItems) {
		// Get TCEFORM from TSconfig of current page
		$row = array('pid' => $this->id);
Nicole Cordes's avatar
Nicole Cordes committed
495
		$TCEFORM_TSconfig = BackendUtility::getTCEFORM_TSconfig('tt_content', $row);
496
497
498
499
500
501
		$headersUsed = array();
		// Traverse wizard items:
		foreach ($wizardItems as $key => $cfg) {
			// Exploding parameter string, if any (old style)
			if ($wizardItems[$key]['params']) {
				// Explode GET vars recursively
Nicole Cordes's avatar
Nicole Cordes committed
502
				$tempGetVars = GeneralUtility::explodeUrl2Array($wizardItems[$key]['params'], TRUE);
503
504
505
				// If tt_content values are set, merge them into the tt_content_defValues array,
				// unset them from $tempGetVars and re-implode $tempGetVars into the param string
				// (in case remaining parameters are around).
506
				if (is_array($tempGetVars['defVals']['tt_content'])) {
507
508
509
510
511
512
					$wizardItems[$key]['tt_content_defValues'] = array_merge(
						is_array($wizardItems[$key]['tt_content_defValues'])
							? $wizardItems[$key]['tt_content_defValues']
							: array(),
						$tempGetVars['defVals']['tt_content']
					);
513
					unset($tempGetVars['defVals']['tt_content']);
Nicole Cordes's avatar
Nicole Cordes committed
514
					$wizardItems[$key]['params'] = GeneralUtility::implodeArrayForUrl('', $tempGetVars);
515
516
517
518
				}
			}
			// If tt_content_defValues are defined...:
			if (is_array($wizardItems[$key]['tt_content_defValues'])) {
519
				$backendUser = $this->getBackendUser();
520
521
522
523
				// Traverse field values:
				foreach ($wizardItems[$key]['tt_content_defValues'] as $fN => $fV) {
					if (is_array($GLOBALS['TCA']['tt_content']['columns'][$fN])) {
						// Get information about if the field value is OK:
524
						$config = &$GLOBALS['TCA']['tt_content']['columns'][$fN]['config'];
525
						$authModeDeny = $config['type'] == 'select' && $config['authMode']
526
							&& !$backendUser->checkAuthMode('tt_content', $fN, $fV, $config['authMode']);
527
528
529
530
531
532
533
						// explode TSconfig keys only as needed
						if (!isset($removeItems[$fN])) {
							$removeItems[$fN] = GeneralUtility::trimExplode(',', $TCEFORM_TSconfig[$fN]['removeItems'], TRUE);
						}
						if (!isset($keepItems[$fN])) {
							$keepItems[$fN] = GeneralUtility::trimExplode(',', $TCEFORM_TSconfig[$fN]['keepItems'], TRUE);
						}
534
						$isNotInKeepItems = !empty($keepItems[$fN]) && !in_array($fV, $keepItems[$fN]);
535
						if ($authModeDeny || $fN === 'CType' && in_array($fV, $removeItems[$fN]) || $isNotInKeepItems) {
536
537
538
539
540
							// Remove element all together:
							unset($wizardItems[$key]);
							break;
						} else {
							// Add the parameter:
541
							$wizardItems[$key]['params'] .= '&defVals[tt_content][' . $fN . ']=' . rawurlencode($fV);
542
543
544
545
546
547
548
549
550
551
							$tmp = explode('_', $key);
							$headersUsed[$tmp[0]] = $tmp[0];
						}
					}
				}
			}
		}
		// remove headers without elements
		foreach ($wizardItems as $key => $cfg) {
			$tmp = explode('_', $key);
552
			if ($tmp[0] && !$tmp[1] && !in_array($tmp[0], $headersUsed)) {
553
554
555
556
557
				unset($wizardItems[$key]);
			}
		}
	}

558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
	/**
	 * Returns LanguageService
	 *
	 * @return \TYPO3\CMS\Lang\LanguageService
	 */
	protected function getLanguageService() {
		return $GLOBALS['LANG'];
	}

	/**
	 * Returns the current BE user.
	 *
	 * @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
	 */
	protected function getBackendUser() {
		return $GLOBALS['BE_USER'];
	}

576
}