102 foreach ($this->modules as $module) {
107 $GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'tslib/class.tslib_adminpanel.php'][
'extendAdminPanel']
112 'The hook $GLOBALS[TYPO3_CONF_VARS][SC_OPTIONS][tslib/class.tslib_adminpanel.php][extendAdminPanel] will be removed in TYPO3 v10.0, register an AdminPanelModule instead.',
115 $hookObject = GeneralUtility::makeInstance($className);
117 throw new \UnexpectedValueException(
118 $className .
' must implement interface ' . AdminPanelViewHookInterface::class,
122 $content = $hookObject->extendAdminPanel($moduleContent, $this);
124 $moduleContent .=
'<div class="typo3-adminPanel-section typo3-adminPanel-section-open">';
125 $moduleContent .=
' <div class="typo3-adminPanel-section-body">';
126 $moduleContent .=
' ' . $content;
127 $moduleContent .=
' </div>';
128 $moduleContent .=
'</div>';
132 return $moduleContent;
147 $output[] =
'<div class="typo3-adminPanel-section typo3-adminPanel-section-open">';
148 $output[] =
' <div class="typo3-adminPanel-section-title">';
151 $output[] =
'<div class="typo3-adminPanel-section-body">';
152 $output[] =
' ' . $module->getContent();
158 foreach ($module->getJavaScriptFiles() as $javaScriptFile) {
183 $onclick =
'document.TSFE_ADMIN_PANEL_FORM[' .
184 GeneralUtility::quoteJSvalue(
'TSFE_ADMIN_PANEL[display_' . $identifier .
']') .
186 ($this->
getBackendUser()->uc[
'AdminPanel'][
'display_' . $identifier] ?
'0' :
'1') .
187 ';document.TSFE_ADMIN_PANEL_FORM.submit();return false;';
190 $output[] =
'<span class="typo3-adminPanel-section-title-identifier"></span>';
191 $output[] =
'<a href="javascript:void(0)" onclick="' . htmlspecialchars($onclick) .
'">';
194 $output[] =
'<input type="hidden" name="TSFE_ADMIN_PANEL[display_' .
212 'AdminPanelView::ext_makeToolBar() will be removed in TYPO3 v10.0, use fluid and backend uri builder to create a toolbar.',
215 $editToolbarService = GeneralUtility::makeInstance(EditToolbarService::class);
216 return $editToolbarService->createToolbar();
227 protected function extGetLL($key, $convertWithHtmlspecialchars =
true)
230 if ($convertWithHtmlspecialchars) {
231 $labelStr = htmlspecialchars($labelStr);
245 'AdminPanelView->getAdminPanelHeaderData() will be removed in TYPO3 v10.0. Implement AdminPanelModules via the new API (see AdminPanelModuleInterface).',
249 if (!empty(
$GLOBALS[
'TBE_STYLES'][
'stylesheets'][
'admPanel'])) {
250 $stylesheet = GeneralUtility::locationHeaderUrl(
$GLOBALS[
'TBE_STYLES'][
'stylesheets'][
'admPanel']);
251 $result =
'<link rel="stylesheet" type="text/css" href="' .
252 htmlspecialchars($stylesheet, ENT_QUOTES | ENT_HTML5) .
'" />';
267 'AdminPanelView->isAdminModuleEnabled() will be removed in TYPO3 v10.0. Implement AdminPanelModules via the new API (see AdminPanelModuleInterface).',
272 if ($key ===
'preview' && $this->ext_forcePreview) {
274 } elseif (!empty($this->configuration[
'enable.'][
'all'])) {
276 } elseif (!empty($this->configuration[
'enable.'][$key])) {
290 'AdminPanelView->saveConfigOptions() will be removed in TYPO3 v10.0. Implement AdminPanelModules via the new API (see AdminPanelModuleInterface).',
293 $input = GeneralUtility::_GP(
'TSFE_ADMIN_PANEL');
295 if (is_array($input)) {
297 $beUser->uc[
'AdminPanel'] = array_merge(
298 !is_array($beUser->uc[
'AdminPanel']) ? [] : $beUser->uc[
'AdminPanel'],
301 unset($beUser->uc[
'AdminPanel'][
'action']);
303 foreach ($this->modules as $module) {
304 if ($module->isEnabled()) {
306 $module->onSubmit($input,
$GLOBALS[
'TYPO3_REQUEST']);
313 $cacheManager->setCacheConfigurations(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'caching'][
'cacheConfigurations']);
314 $cacheManager->getCache(
'fluid_template')->flush();
329 'AdminPanelView->extGetFeAdminValue() will be removed in TYPO3 v10.0. Implement AdminPanelModules via the new API (see AdminPanelModuleInterface).',
340 $sectionName ===
'edit' && (
341 $val ===
'displayIcons' && $this->configuration[
'module.'][
'edit.'][
'forceDisplayIcons'] ||
342 $val ===
'displayFieldIcons' && $this->configuration[
'module.'][
'edit.'][
'forceDisplayFieldIcons'] ||
343 $val ===
'editNoPopup' && $this->configuration[
'module.'][
'edit.'][
'forceNoPopup']
350 if ($val && isset($this->configuration[
'override.'][$sectionName .
'.'][$val])) {
351 return $this->configuration[
'override.'][$sectionName .
'.'][$val];
353 if (!$val && isset($this->configuration[
'override.'][$sectionName])) {
354 return $this->configuration[
'override.'][$sectionName];
357 $returnValue = $val ? $beUser->uc[
'AdminPanel'][$sectionName .
'_' . $val] : 1;
360 if ($sectionName ===
'preview' && $this->ext_forcePreview) {
361 return !$val ? true : $returnValue;
376 'AdminPanelView->forcePreview() will be removed in TYPO3 v10.0. Use new AdminPanel Preview Module instead.',
379 $this->ext_forcePreview =
true;
392 'AdminPanelView->isAdminModuleOpen() will be removed in TYPO3 v10.0. Use new AdminPanel API instead.',
412 public function extGetItem($title, $content =
'', $checkbox =
'', $outerDivClass =
null, $innerDivClass =
null)
415 'AdminPanelView->extGetItem() will be removed in TYPO3 v10.0. Use new AdminPanel API instead.',
418 $title = $title ?
'<label for="' . htmlspecialchars($title) .
'">' . $this->
extGetLL($title) .
'</label>' :
'';
420 $out .= (string)$outerDivClass ?
'<div class="' . htmlspecialchars($outerDivClass) .
'">' :
'<div>';
421 $out .= (string)$innerDivClass ?
'<div class="' . htmlspecialchars($innerDivClass) .
'">' :
'<div>';
422 $out .= $checkbox . $title . $content .
'</div></div>';
439 'AdminPanelView->extGetHead() will be removed in TYPO3 v10.0. Use new AdminPanel API instead.',
458 'AdminPanelView->linkSectionHeader() will be removed in TYPO3 v10.0. Use new AdminPanel API instead.',
461 $onclick =
'document.TSFE_ADMIN_PANEL_FORM[' .
462 GeneralUtility::quoteJSvalue(
'TSFE_ADMIN_PANEL[display_' . $sectionSuffix .
']') .
464 ($this->
getBackendUser()->uc[
'AdminPanel'][
'display_' . $sectionSuffix] ?
'0' :
'1') .
465 ';document.TSFE_ADMIN_PANEL_FORM.submit();return false;';
468 $output[] =
'<span class="typo3-adminPanel-section-title-identifier"></span>';
469 $output[] =
'<a href="javascript:void(0)" onclick="' . htmlspecialchars($onclick) .
'">';
472 $output[] =
'<input type="hidden" name="TSFE_ADMIN_PANEL[display_' .