diff --git a/typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php b/typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php old mode 100644 new mode 100755 index 3b6f25be2ea36e485c7b1f392dd26d9a7e2b056c..350a2d67eb2c80f26fb132048f7997b8e0e2ec8e --- a/typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php +++ b/typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php @@ -112,140 +112,6 @@ class ConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase $this->assertTrue($this->matchCondition->match($testCondition)); } - /** - * Tests whether a condition matches Internet Explorer 7 on Windows. - * - * @return void - * @test - */ - public function conditionMatchesInternetExplorer7Windows() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)'; - $result = $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does not match Internet Explorer 7 on Windows. - * - * @return void - * @test - */ - public function conditionDoesNotMatchInternetExplorer7Windows() - { - $_SERVER['HTTP_USER_AGENT'] = 'Opera/9.25 (Windows NT 6.0; U; en)'; - $result = $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]'); - $this->assertFalse($result); - } - - /** - * Tests whether a condition does match the iOS with the correct and more recent 'iOS' - * - * @test - */ - public function conditionDoesMatchIosWithCorrectSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10'; - $result = $this->matchCondition->match('[system = iOS]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match the iOS with the old 'mac' - * - * @test - */ - public function conditionDoesMatchIosWithOldSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10'; - $result = $this->matchCondition->match('[system = mac]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match Windows 2000 with the correct and more recent 'win2k' - * - * @test - */ - public function conditionDoesMatchWindows2kWithNewSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)'; - $result = $this->matchCondition->match('[system = win2k]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match Windows 2000 with the old 'winNT' - * - * @test - */ - public function conditionDoesMatchWindows2kWithOldSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)'; - $result = $this->matchCondition->match('[system = winNT]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match Windows NT with 'winNT' - * - * @test - */ - public function conditionDoesMatchWindowsNtWithSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)'; - $result = $this->matchCondition->match('[system = winNT]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match Android with the correct and more recent 'android' - * - * @test - */ - public function conditionDoesMatchAndroidWithNewSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'; - $result = $this->matchCondition->match('[system = android]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match Android with the old 'linux' - * - * @test - */ - public function conditionDoesMatchAndroidWithOldSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'; - $result = $this->matchCondition->match('[system = linux]'); - $this->assertTrue($result); - } - - /** - * Tests whether a device type condition matches a crawler. - * - * @test - */ - public function deviceConditionMatchesRobot() - { - $_SERVER['HTTP_USER_AGENT'] = 'Googlebot/2.1 (+http://www.google.com/bot.html)'; - $result = $this->matchCondition->match('[device = robot]'); - $this->assertTrue($result); - } - - /** - * Tests whether a device type condition does not match a crawler. - * - * @test - */ - public function deviceConditionDoesNotMatchRobot() - { - $_SERVER['HTTP_USER_AGENT'] = md5('Some strange user agent'); - $result = $this->matchCondition->match('[device = robot]'); - $this->assertFalse($result); - } - /** * Tests whether the language comparison matches. * diff --git a/typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php b/typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php index 66b8ef0fb77ba27816ef70961e8fa0064fe00406..5b8e70f21c2fb7950152a328ec840af95cebc791 100644 --- a/typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php +++ b/typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php @@ -20,7 +20,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; * Matching TypoScript conditions * * Used with the TypoScript parser. - * Matches browserinfo, IPnumbers for use with templates + * Matches IPnumbers etc. for use with templates */ abstract class AbstractConditionMatcher { @@ -201,13 +201,6 @@ abstract class AbstractConditionMatcher */ protected function evaluateConditionCommon($key, $value) { - $lowerKey = strtolower($key); - if ($lowerKey === 'browser' || $lowerKey === 'device' || $lowerKey === 'version' || $lowerKey === 'system' || $lowerKey === 'useragent') { - GeneralUtility::deprecationLog( - 'Usage of client related conditions (browser, device, version, system, useragent) is deprecated since 7.0.' - ); - $browserInfo = $this->getBrowserInfo(GeneralUtility::getIndpEnv('HTTP_USER_AGENT')); - } $keyParts = GeneralUtility::trimExplode('|', $key); switch ($keyParts[0]) { case 'applicationContext': @@ -220,82 +213,6 @@ abstract class AbstractConditionMatcher } return false; break; - case 'browser': - $values = GeneralUtility::trimExplode(',', $value, true); - // take all identified browsers into account, eg chrome deliver - // webkit=>532.5, chrome=>4.1, safari=>532.5 - // so comparing string will be - // "webkit532.5 chrome4.1 safari532.5" - $all = ''; - foreach ($browserInfo['all'] as $key => $value) { - $all .= $key . $value . ' '; - } - foreach ($values as $test) { - if (stripos($all, $test) !== false) { - return true; - } - } - return false; - break; - case 'version': - $values = GeneralUtility::trimExplode(',', $value, true); - foreach ($values as $test) { - if (strcspn($test, '=<>') == 0) { - switch ($test[0]) { - case '=': - if (doubleval(substr($test, 1)) == $browserInfo['version']) { - return true; - } - break; - case '<': - if (doubleval(substr($test, 1)) > $browserInfo['version']) { - return true; - } - break; - case '>': - if (doubleval(substr($test, 1)) < $browserInfo['version']) { - return true; - } - break; - } - } elseif (strpos(' ' . $browserInfo['version'], $test) == 1) { - return true; - } - } - return false; - break; - case 'system': - $values = GeneralUtility::trimExplode(',', $value, true); - // Take all identified systems into account, e.g. mac for iOS, Linux - // for android and Windows NT for Windows XP - $allSystems = ' ' . implode(' ', $browserInfo['all_systems']); - foreach ($values as $test) { - if (stripos($allSystems, $test) !== false) { - return true; - } - } - return false; - break; - case 'device': - if (!isset($this->deviceInfo)) { - $this->deviceInfo = $this->getDeviceType(GeneralUtility::getIndpEnv('HTTP_USER_AGENT')); - } - $values = GeneralUtility::trimExplode(',', $value, true); - foreach ($values as $test) { - if ($this->deviceInfo == $test) { - return true; - } - } - return false; - break; - case 'useragent': - $test = trim($value); - if ($test !== '') { - return $this->searchStringWildcard((string)$browserInfo['useragent'], $test); - } else { - return false; - } - break; case 'language': if (GeneralUtility::getIndpEnv('HTTP_ACCEPT_LANGUAGE') === $value) { return true; @@ -636,29 +553,6 @@ abstract class AbstractConditionMatcher return $result; } - /** - * Generates an array with abstracted browser information - * - * @param string $userAgent The useragent string, \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_USER_AGENT') - * @return array Contains keys "browser", "version", "system - */ - protected function getBrowserInfo($userAgent) - { - return \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgent); - } - - /** - * Gets a code for a browsing device based on the input useragent string. - * - * @param string $userAgent The useragent string, \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_USER_AGENT') - * @return string Code for the specific device type - * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 - */ - protected function getDeviceType($userAgent) - { - return \TYPO3\CMS\Core\Utility\ClientUtility::getDeviceType($userAgent); - } - /** * Return global variable where the input string $var defines array keys separated by "|" * Example: $var = "HTTP_SERVER_VARS | something" will return the value $GLOBALS['HTTP_SERVER_VARS']['something'] value diff --git a/typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php b/typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php index 152b335e777570bdd0422b89f5814be224425968..55bde121b00d262ec7a63c86382eb1d7d2662216 100644 --- a/typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php +++ b/typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php @@ -183,17 +183,6 @@ class ConfigurationForm extends ExtendedTemplateService return $arr; } - /** - * @param string $key - * @return string - * @deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8 - */ - public function ext_getKeyImage($key) - { - GeneralUtility::logDeprecatedFunction(); - return '<span class="label label-danger">' . $key . '</span>'; - } - /** * @param string $imgConf * @return string diff --git a/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php b/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php index b8753b4c8377c4c6912ecff62c53e8834d5a7719..4aace4b50352ff1549adb5818d0a16463d2ad899 100644 --- a/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php +++ b/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php @@ -167,13 +167,6 @@ class ExtendedTemplateService extends TemplateService */ public $ext_noPMicons = 0; - /** - * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 - * - * @var int - */ - public $ext_noSpecialCharsOnLabels = 0; - /** * @var array */ @@ -569,17 +562,6 @@ class ExtendedTemplateService extends TemplateService return implode('; ', $lnArr); } - /** - * @param array $theValue - * @return array - * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 - use htmlspecialchars() directly - */ - public function makeHtmlspecialchars($theValue) - { - GeneralUtility::logDeprecatedFunction(); - return $this->ext_noSpecialCharsOnLabels ? $theValue : htmlspecialchars($theValue); - } - /** * @param array $arr * @param string $depth_in @@ -1113,17 +1095,6 @@ class ExtendedTemplateService extends TemplateService $this->helpConfig = $out; } - /** - * @param string $key - * @return string - * @deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8 - */ - public function ext_getKeyImage($key) - { - GeneralUtility::logDeprecatedFunction(); - return '<span class="label label-danger">' . $key . '</span>'; - } - /** * @param string $imgConf * @return string diff --git a/typo3/sysext/core/Classes/TypoScript/TemplateService.php b/typo3/sysext/core/Classes/TypoScript/TemplateService.php index 84dcde1ef2bc238a43f521ee81c38348c365b802..02232ecee6e765ade40677bec6931c432307fe62 100644 --- a/typo3/sysext/core/Classes/TypoScript/TemplateService.php +++ b/typo3/sysext/core/Classes/TypoScript/TemplateService.php @@ -101,12 +101,6 @@ class TemplateService */ public $ext_regComments = false; - /** - * @deprecated since TYPO3 CMS 7, will be removed with CMS 8. - * @var string - */ - public $tempPath = 'typo3temp/'; - /** * This MUST be initialized by the init() function * @@ -1414,26 +1408,6 @@ class TemplateService return null; } - /** - * Ordinary "wrapping" function. Used in the AbstractMenuContentObject class and extension classes instead of the similar function in ContentObjectRenderer - * - * @param string $content The content to wrap - * @param string $wrap The wrap value, eg. "<strong> | </strong> - * @return string Wrapped input string - * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::wrap() instead - * @see \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject, \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::wrap() - */ - public function wrap($content, $wrap) - { - GeneralUtility::logDeprecatedFunction(); - if ($wrap) { - $wrapArr = explode('|', $wrap); - return trim($wrapArr[0]) . $content . trim($wrapArr[1]); - } else { - return $content; - } - } - /** * Removes the "?" of input string IF the "?" is the last character. * diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-72427-RemovedTypoScript-relatedMethodsAndProperties.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-72427-RemovedTypoScript-relatedMethodsAndProperties.rst new file mode 100644 index 0000000000000000000000000000000000000000..5c2c8b47c1f844051f1deeca9a46fe7ae9d14417 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-72427-RemovedTypoScript-relatedMethodsAndProperties.rst @@ -0,0 +1,27 @@ +==================================================================== +Breaking: #72427 - Removed TypoScript-related methods and properties +==================================================================== + +Description +=========== + +The following methods and properties were removed: + +* ``TYPO3\CMS\Core\TypoScript\ConfigurationForm::ext_getKeyImage()`` +* ``TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::ext_noSpecialCharsOnLabels`` +* ``TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::makeHtmlspecialchars()`` +* ``TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::ext_getKeyImage()`` +* ``TYPO3\CMS\Core\TypoScript\TemplateService::tempPath`` +* ``TYPO3\CMS\Core\TypoScript\TemplateService::wrap()`` +* ``TYPO3\CMS\T3editor\T3editor::isEnabled()`` +* ``TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateObjectBrowserModuleFunctionController::verify_TSobjects()`` + +The TypoScript conditions "browser", "version", "device", "system" and "useragent" were removed. + + +Impact +====== + +Calling the methods above will result in a PHP fatal error. + +Using the removed TypoScript conditions will have no effect anymore. \ No newline at end of file diff --git a/typo3/sysext/frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php b/typo3/sysext/frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php old mode 100644 new mode 100755 index f5ff1bec7c54c49dca846c47f9112934ea6b1d77..4396f2926ec7afacb0c4e6f7053ca6c568d7e31f --- a/typo3/sysext/frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php +++ b/typo3/sysext/frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php @@ -82,140 +82,6 @@ class ConditionMatcherTest extends UnitTestCase $this->assertTrue($this->matchCondition->match($testCondition)); } - /** - * Tests whether a condition matches Internet Explorer 7 on Windows. - * - * @return void - * @test - */ - public function conditionMatchesInternetExplorer7Windows() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)'; - $result = $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does not match Internet Explorer 7 on Windows. - * - * @return void - * @test - */ - public function conditionDoesNotMatchInternetExplorer7Windows() - { - $_SERVER['HTTP_USER_AGENT'] = 'Opera/9.25 (Windows NT 6.0; U; en)'; - $result = $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]'); - $this->assertFalse($result); - } - - /** - * Tests whether a condition does match the iOS with the correct and more recent 'iOS' - * - * @test - */ - public function conditionDoesMatchIosWithCorrectSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10'; - $result = $this->matchCondition->match('[system = iOS]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match the iOS with the old 'mac' - * - * @test - */ - public function conditionDoesMatchIosWithOldSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10'; - $result = $this->matchCondition->match('[system = mac]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match Windows 2000 with the correct and more recent 'win2k' - * - * @test - */ - public function conditionDoesMatchWindows2kWithNewSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)'; - $result = $this->matchCondition->match('[system = win2k]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match Windows 2000 with the old 'winNT' - * - * @test - */ - public function conditionDoesMatchWindows2kWithOldSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)'; - $result = $this->matchCondition->match('[system = winNT]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match Windows NT with 'winNT' - * - * @test - */ - public function conditionDoesMatchWindowsNtWithSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)'; - $result = $this->matchCondition->match('[system = winNT]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match Android with the correct and more recent 'android' - * - * @test - */ - public function conditionDoesMatchAndroidWithNewSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'; - $result = $this->matchCondition->match('[system = android]'); - $this->assertTrue($result); - } - - /** - * Tests whether a condition does match Android with the old 'linux' - * - * @test - */ - public function conditionDoesMatchAndroidWithOldSystemKey() - { - $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'; - $result = $this->matchCondition->match('[system = linux]'); - $this->assertTrue($result); - } - - /** - * Tests whether a device type condition matches a crawler. - * - * @test - */ - public function deviceConditionMatchesRobot() - { - $_SERVER['HTTP_USER_AGENT'] = 'Googlebot/2.1 (+http://www.google.com/bot.html)'; - $result = $this->matchCondition->match('[device = robot]'); - $this->assertTrue($result); - } - - /** - * Tests whether a device type condition does not match a crawler. - * - * @test - */ - public function deviceConditionDoesNotMatchRobot() - { - $_SERVER['HTTP_USER_AGENT'] = md5('Some strange user agent'); - $result = $this->matchCondition->match('[device = robot]'); - $this->assertFalse($result); - } - /** * Tests whether the language comparison matches. * diff --git a/typo3/sysext/t3editor/Classes/T3editor.php b/typo3/sysext/t3editor/Classes/T3editor.php index 87ffb9f1cc1895027c67c675011e7f12a9fa2f1e..f716f48f2472fbc4f8d2c8126c2db0e85da57c4b 100755 --- a/typo3/sysext/t3editor/Classes/T3editor.php +++ b/typo3/sysext/t3editor/Classes/T3editor.php @@ -159,16 +159,6 @@ class T3editor implements \TYPO3\CMS\Core\SingletonInterface return $this->mode; } - /** - * @return bool TRUE if the t3editor is enabled - * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 - */ - public function isEnabled() - { - GeneralUtility::logDeprecatedFunction(); - return true; - } - /** * Creates a new instance of the class */ diff --git a/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php b/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php index 452fe94537f5b00a10edbb5931e3f7c6928c372b..738ddf4ce70449ee0ef127dfb8bd866556c42484 100644 --- a/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php +++ b/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php @@ -103,77 +103,6 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController extends AbstractFu return $modMenu; } - /** - * Verify TS objects - * - * @param array $propertyArray - * @param string $parentType - * @param string $parentValue - * @return array|NULL - * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 - */ - public function verify_TSobjects($propertyArray, $parentType, $parentValue) - { - GeneralUtility::logDeprecatedFunction(); - $TSobjTable = array( - 'PAGE' => array( - 'prop' => array( - 'typeNum' => 'int', - '1,2,3' => 'COBJ', - 'bodyTag' => 'string' - ) - ), - 'TEXT' => array( - 'prop' => array( - 'value' => 'string' - ) - ), - 'HTML' => array( - 'prop' => array( - 'value' => 'stdWrap' - ) - ), - 'stdWrap' => array( - 'prop' => array( - 'field' => 'string', - 'current' => 'boolean' - ) - ) - ); - $TSobjDataTypes = array( - 'COBJ' => 'TEXT,CONTENT', - 'PAGE' => 'PAGE', - 'stdWrap' => '' - ); - if ($parentType) { - if (isset($TSobjDataTypes[$parentType]) && (!$TSobjDataTypes[$parentType] || GeneralUtility::inlist($TSobjDataTypes[$parentType], $parentValue))) { - $ObjectKind = $parentValue; - } else { - // Object kind is "" if it should be known. - $ObjectKind = ''; - } - } else { - // If parentType is not given, then it can be anything. Free. - $ObjectKind = $parentValue; - } - if ($ObjectKind && is_array($TSobjTable[$ObjectKind])) { - $result = array(); - if (is_array($propertyArray)) { - foreach ($propertyArray as $key => $val) { - if (MathUtility::canBeInterpretedAsInteger($key)) { - // If num-arrays - $result[$key] = $TSobjTable[$ObjectKind]['prop']['1,2,3']; - } else { - // standard - $result[$key] = $TSobjTable[$ObjectKind]['prop'][$key]; - } - } - } - return $result; - } - return null; - } - /** * Initialize editor *