Commit 1eff7f38 authored by Fabian Galinski's avatar Fabian Galinski 😾
Browse files

[FEATURE] Add compatibility for PHP 5.3

parent 20df78bd
......@@ -36,7 +36,7 @@ class TcaProvider implements SingletonInterface{
*
* @var array
*/
protected static $allowedTypesForContentLink = [
protected static $allowedTypesForContentLink = array(
'header' => 'header',
'text' => 'text',
'textpic' => 'textpic',
......@@ -52,7 +52,7 @@ class TcaProvider implements SingletonInterface{
'list' => 'list',
'fluidcontent_content' => 'fluidcontent_content',
'gridelements_pi1' => 'gridelements_pi1',
];
);
/**
* Returns the display condition for the TCA.
......@@ -60,14 +60,14 @@ class TcaProvider implements SingletonInterface{
* @return array
*/
public static function getAllowedTypesForTcaDisplayCond() {
$conditions = [];
$conditions = array();
foreach (self::$allowedTypesForContentLink as $allowedTypeForContentLink) {
$conditions[] = 'FIELD:CType:=:' . $allowedTypeForContentLink;
}
return [
return array(
'OR' => $conditions,
];
);
}
/**
......
<?php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'tt_content', [
'tx_sgcontentlink_contentlink' => [
'tt_content', array(
'tx_sgcontentlink_contentlink' => array(
'displayCond' => \SGalinski\SgContentlink\TCA\TcaProvider::getAllowedTypesForTcaDisplayCond(),
'exclude' => 1,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_contentlink/Resources/Private/Language/locallang_db.xlf:tt_content.tx_sgcontentlink_contentlink',
'config' => [
'config' => array(
'type' => 'input',
'size' => 50,
'eval' => 'trim',
'wizards' => [
'wizards' => array(
'_PADDING' => 2,
'link' => [
'link' => array(
'type' => 'popup',
'title' => 'LLL:EXT:cms/locallang_ttc.xlf:header_link_formlabel',
'icon' => 'link_popup.gif',
'module' => [
'module' => array(
'name' => 'wizard_element_browser',
'urlParameters' => [
'urlParameters' => array(
'mode' => 'wizard'
]
],
'params' => [
),
),
'params' => array(
'blindLinkOptions' => 'folder, file, mail, spec',
'blindLinkFields' => 'target,title,class,params'
],
),
'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
]
],
],
],
]
)
),
),
),
)
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
......
......@@ -23,7 +23,7 @@ $EM_CONF[$_EXTKEY] = array(
'constraints' => array(
'depends' => array(
'typo3' => '6.2.0-7.9.99',
'php' => '5.4.0-5.6.99',
'php' => '5.3.0-5.6.99',
),
'conflicts' => array(),
'suggests' => array(),
......
Supports Markdown
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