Commit 2a76824a authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Change deprecated formlabel and static TS registration

parent 8fceb371
......@@ -37,10 +37,7 @@ class TcaProvider implements SingletonInterface{
* @var array
*/
protected static $allowedTypesForContentLink = array(
// New CTypes in 7.6
'textmedia' => 'textmedia',
// CTypes in 6.2
'header' => 'header',
'text' => 'text',
'textpic' => 'textpic',
......
<?php
/**
*
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.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 3 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!
*/
call_user_func(
function ($extKey, $table) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$extKey, 'Configuration/TypoScript/Frontend', 'Contentlink'
);
}, 'sg_contentlink', 'sys_template'
);
<?php
/**
*
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.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 3 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!
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'tt_content', [
'tx_sgcontentlink_contentlink' => [
'displayCond' => \SGalinski\SgContentlink\TCA\TcaProvider::getAllowedTypesForTcaDisplayCond(),
'exclude' => 1,
'label' => 'LLL:EXT:sg_contentlink/Resources/Private/Language/locallang_db.xlf:tt_content.tx_sgcontentlink_contentlink',
'config' => [
'type' => 'input',
'size' => 50,
'eval' => 'trim',
'wizards' => [
'_PADDING' => 2,
'link' => [
'type' => 'popup',
'title' => 'LLL:EXT:cms/locallang_ttc.xlf:header_link_formlabel',
'icon' => 'link_popup.gif',
'module' => [
'name' => 'wizard_element_browser',
'urlParameters' => [
'mode' => 'wizard'
],
call_user_func(
function ($extKey, $table) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
$table, [
'tx_sgcontentlink_contentlink' => [
'displayCond' => \SGalinski\SgContentlink\TCA\TcaProvider::getAllowedTypesForTcaDisplayCond(),
'exclude' => 1,
'label' => 'LLL:EXT:sg_contentlink/Resources/Private/Language/locallang_db.xlf:tt_content.tx_sgcontentlink_contentlink',
'config' => [
'type' => 'input',
'size' => 50,
'eval' => 'trim',
'wizards' => [
'_PADDING' => 2,
'link' => [
'type' => 'popup',
'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header_link_formlabel',
'icon' => 'link_popup.gif',
'module' => [
'name' => 'wizard_element_browser',
'urlParameters' => [
'mode' => 'wizard'
],
],
'JSopenParams' => 'height=600,width=500,status=0,menubar=0,scrollbars=1'
]
],
'JSopenParams' => 'height=600,width=500,status=0,menubar=0,scrollbars=1'
]
],
],
],
],
]
);
]
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
$table, '--linebreak--LLL:EXT:sg_contentlink/Resources/Private/Language/locallang_db.xlf:tt_content.tx_sgcontentlink_contentlink,tx_sgcontentlink_contentlink', '', 'after:subheader'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'tt_content', '--linebreak--LLL:EXT:sg_contentlink/Resources/Private/Language/locallang_db.xlf:tt_content.tx_sgcontentlink_contentlink,tx_sgcontentlink_contentlink', '', 'after:subheader'
}, 'sg_contentlink', 'tt_content'
);
{
"name": "sgalinski/sg-contentlink",
"type": "typo3-cms-extension",
"description": "sgalinski Contentlink - Possibility to set a link around a whole content element. (Include static template)",
"homepage": "https://www.sgalinski.de",
"license": ["GPL-2.0-or-later"],
"version": "1.4.2",
"support": {
"issues": "https://gitlab.sgalinski.de/typo3/sg_contentlink/issues"
},
"require": {
"typo3/cms-core": "^7.6.0 || ^8.7.0 || ^9.5.1"
},
"replace": {
"sg_contentlink": "self.version"
},
"autoload": {
"psr-4": {
"SGalinski\\SgContentlink\\": "Classes/"
}
}
"name": "sgalinski/sg-contentlink",
"type": "typo3-cms-extension",
"description": "sgalinski Contentlink - Possibility to set a link around a whole content element. (Include static template)",
"homepage": "https://www.sgalinski.de",
"license": [
"GPL-2.0-or-later"
],
"version": "1.4.2",
"support": {
"issues": "https://gitlab.sgalinski.de/typo3/sg_contentlink/issues"
},
"require": {
"typo3/cms-core": "^8.7.0 || ^9.5.1"
},
"require-dev": {
"roave/security-advisories": "dev-master"
},
"replace": {
"sg_contentlink": "self.version"
},
"autoload": {
"psr-4": {
"SGalinski\\SgContentlink\\": "Classes/"
}
}
}
......@@ -26,8 +26,8 @@ $EM_CONF[$_EXTKEY] = [
[
'depends' =>
[
'typo3' => '7.6.0-9.5.99',
'php' => '5.5.0-7.3.99',
'typo3' => '8.7.0-9.5.99',
'php' => '7.0.0-7.3.99',
],
'conflicts' =>
[
......
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'sg_contentlink', 'Configuration/TypoScript/Frontend', 'Contentlink'
);
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment