TYPO3 Flexform配置

时间:2018-06-07 06:48:14

标签: typo3 flexform

我的Flexform配置无法显示。我认为ext_tables.php中的所有内容都是错误的。

也许路径(pluginSignature)出错了?

defined('TYPO3_MODE') || die('Access denied.');

call_user_func(
function()
{
    // Build extension name vars - used for plugin registration, flexforms and similar
    $extensionName = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY);
    $pluginSignature = strtolower($extensionName) . '_operationsstatistics';

    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
        'FfwLohfelden.OperationsStatistics',
        'Operationsstatistics',
        'Operations Statistics'
    );

    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('operations_statistics', 'Configuration/TypoScript', 'Operations Statistics');

    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_operationsstatistics_domain_model_statistic', 'EXT:operations_statistics/Resources/Private/Language/locallang_csh_tx_operationsstatistics_domain_model_statistic.xlf');
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_operationsstatistics_domain_model_statistic');

    $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'layout,select_key,pages,recursive';
    $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature,
        'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForm/flexform_list.xml');

}
);

1 个答案:

答案 0 :(得分:0)

您可以在ext_tables.php文件中尝试使用以下配置。

//extenstion name
$extensionName = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY);

//plugin integration
$frontendpluginName = 'plugin name';
$pluginSignature = strtolower($extensionName) . '_'.strtolower(
    $frontendpluginName
);

$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
    $pluginSignature,
    'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/configure.xml'
);