--- /dev/null
+<?php
+namespace TYPO3\CMS\Backend\Controller;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * 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.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * Class ContextHelpAjaxController
+ */
+class ContextHelpAjaxController
+{
+ /**
+ * The main dispatcher function. Collect data and prepare HTML output.
+ *
+ * @param ServerRequestInterface $request
+ * @param ResponseInterface $response
+ * @return ResponseInterface
+ */
+ public function getHelpAction(ServerRequestInterface $request, ResponseInterface $response)
+ {
+ $params = isset($request->getParsedBody()['params']) ? $request->getParsedBody()['params'] : $request->getQueryParams()['params'];
+ if ($params['action'] === 'getContextHelp') {
+ $result = $this->getContextHelp($params['table'], $params['field']);
+ $response->getBody()->write(json_encode([
+ 'title' => $result['title'],
+ 'content' => $result['description'],
+ 'link' => $result['moreInfo']
+ ]));
+ }
+ return $response;
+ }
+
+ /**
+ * Fetch the context help for the given table/field parameters
+ *
+ * @param string $table Table identifier
+ * @param string $field Field identifier
+ * @return array complete Help information
+ */
+ protected function getContextHelp($table, $field)
+ {
+ $helpTextArray = BackendUtility::helpTextArray($table, $field);
+ $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+ $moreIcon = $helpTextArray['moreInfo'] ? $iconFactory->getIcon('actions-view-go-forward', Icon::SIZE_SMALL)->render() : '';
+ return [
+ 'title' => $helpTextArray['title'],
+ 'description' => '<p class="t3-help-short' . ($moreIcon ? ' tipIsLinked' : '') . '">' . $helpTextArray['description'] . $moreIcon . '</p>',
+ 'id' => $table . '.' . $field,
+ 'moreInfo' => $helpTextArray['moreInfo']
+ ];
+ }
+}
*/
public static function wrapInHelp($table, $field, $text = '', array $overloadHelpText = [])
{
- if (!ExtensionManagementUtility::isLoaded('context_help')) {
- return $text;
- }
-
// Initialize some variables
$helpText = '';
$abbrClassAdd = '';
'records_localize' => [
'path' => '/records/localize',
'target' => Controller\Page\LocalizationController::class . '::localizeRecords'
+ ],
+
+ // context help
+ 'context_help' => [
+ 'path' => '/context-help',
+ 'target' => \TYPO3\CMS\Backend\Controller\ContextHelpAjaxController::class . '::getHelpAction'
]
];
+++ /dev/null
-<?php
-namespace TYPO3\CMS\ContextHelp\Controller;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * 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.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use Psr\Http\Message\ResponseInterface;
-use Psr\Http\Message\ServerRequestInterface;
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Class ContextHelpAjaxController
- */
-class ContextHelpAjaxController
-{
- /**
- * The main dispatcher function. Collect data and prepare HTML output.
- *
- * @param ServerRequestInterface $request
- * @param ResponseInterface $response
- * @return ResponseInterface
- */
- public function getHelpAction(ServerRequestInterface $request, ResponseInterface $response)
- {
- $params = isset($request->getParsedBody()['params']) ? $request->getParsedBody()['params'] : $request->getQueryParams()['params'];
- if ($params['action'] === 'getContextHelp') {
- $result = $this->getContextHelp($params['table'], $params['field']);
- $response->getBody()->write(json_encode([
- 'title' => $result['title'],
- 'content' => $result['description'],
- 'link' => $result['moreInfo']
- ]));
- }
- return $response;
- }
-
- /**
- * Fetch the context help for the given table/field parameters
- *
- * @param string $table Table identifier
- * @param string $field Field identifier
- * @return array complete Help information
- */
- protected function getContextHelp($table, $field)
- {
- $helpTextArray = BackendUtility::helpTextArray($table, $field);
- /** @var IconFactory $iconFactory */
- $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
- $moreIcon = $helpTextArray['moreInfo'] ? $iconFactory->getIcon('actions-view-go-forward', Icon::SIZE_SMALL)->render() : '';
- return [
- 'title' => $helpTextArray['title'],
- 'description' => '<p class="t3-help-short' . ($moreIcon ? ' tipIsLinked' : '') . '">' . $helpTextArray['description'] . $moreIcon . '</p>',
- 'id' => $table . '.' . $field,
- 'moreInfo' => $helpTextArray['moreInfo']
- ];
- }
-}
+++ /dev/null
-<?php
-
-/**
- * Definitions for routes provided by EXT:context_help
- */
-return [
- // Fetch data about the context help
- 'context_help' => [
- 'path' => '/context-help',
- 'target' => \TYPO3\CMS\ContextHelp\Controller\ContextHelpAjaxController::class . '::getHelpAction'
- ]
-];
+++ /dev/null
-{
- "name": "typo3/cms-context-help",
- "type": "typo3-cms-framework",
- "description": "TYPO3 Core",
- "homepage": "https://typo3.org",
- "license": ["GPL-2.0+"],
-
- "require": {
- "typo3/cms-core": "*"
- },
- "replace": {
- "context_help": "*"
- },
- "extra": {
- "typo3/cms": {
- "Package": {
- "partOfFactoryDefault": true
- }
- }
- },
- "autoload": {
- "psr-4": {
- "TYPO3\\CMS\\ContextHelp\\": "Classes/"
- }
- }
-}
+++ /dev/null
-<?php
-$EM_CONF[$_EXTKEY] = [
- 'title' => 'Context Sensitive Help',
- 'description' => 'Provides context sensitive help to tables, fields and modules in the system languages.',
- 'category' => 'be',
- 'state' => 'stable',
- 'uploadfolder' => 0,
- 'createDirs' => '',
- 'clearCacheOnLoad' => 0,
- 'author' => 'Kasper Skaarhoj',
- 'author_email' => 'kasperYYYY@typo3.com',
- 'author_company' => 'Curby Soft Multimedia',
- 'version' => '9.0.0',
- 'constraints' => [
- 'depends' => [
- 'typo3' => '9.0.0-9.0.99',
- ],
- 'conflicts' => [],
- 'suggests' => [],
- ],
-];
--- /dev/null
+.. include:: ../../Includes.txt
+
+=========================================================
+Breaking: #81225 - Merged EXT:context_help to EXT:backend
+=========================================================
+
+See :issue:`81225`
+
+Description
+===========
+
+The extension context_help has been merged into the extension backend.
+
+
+Impact
+======
+
+The extension backend can't be deactivated. Therefore any check if context_help is installed will return false.
+
+
+Affected Installations
+======================
+
+Installations with extensions with checks for extension context_help being installed.
+
+
+Migration
+=========
+
+Remove the checks.
+
+.. index:: Backend
<?php
return [
- 'TYPO3\\CMS\\Lang\\LanguageService' => \TYPO3\CMS\Core\Localization\LanguageService::class
+ 'TYPO3\\CMS\\Lang\\LanguageService' => \TYPO3\CMS\Core\Localization\LanguageService::class,
+ 'TYPO3\\CMS\\ContextHelp\\Controller\\ContextHelpAjaxController' => \TYPO3\CMS\Backend\Controller\ContextHelpAjaxController::class
];
{
}
}
+
+namespace TYPO3\CMS\ContextHelp\Controller {
+ class ContextHelpAjaxController extends \TYPO3\CMS\Backend\Controller\ContextHelpAjaxController
+ {
+ }
+}