meilisearch/Configuration/TCA/Overrides/tt_content.php

49 lines
1.7 KiB
PHP
Raw Normal View History

2021-04-17 00:26:33 +02:00
<?php
if (!defined ('TYPO3_MODE')) {
die ('Access denied.');
}
// Register the plugins
2021-04-17 21:20:54 +02:00
$pluginSignature = 'meilisearch_pi_search';
2021-04-17 00:26:33 +02:00
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
2021-04-17 21:20:54 +02:00
'meilisearch',
2021-04-17 00:26:33 +02:00
'pi_search',
'LLL:EXT:meilisearch/Resources/Private/Language/locallang.xlf:tt_content.list_type_pi_search'
);
$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:meilisearch/Configuration/FlexForms/Form.xml'
);
2021-04-17 21:20:54 +02:00
$pluginSignature = 'meilisearch_pi_frequentlysearched';
2021-04-17 00:26:33 +02:00
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
2021-04-17 21:20:54 +02:00
'meilisearch',
2021-04-17 00:26:33 +02:00
'pi_frequentlySearched',
'LLL:EXT:meilisearch/Resources/Private/Language/locallang.xlf:tt_content.list_type_pi_frequentsearches'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature]
= 'layout,select_key,pages,recursive';
2021-04-17 21:20:54 +02:00
$pluginSignature = 'meilisearch_pi_results';
2021-04-17 00:26:33 +02:00
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
2021-04-17 21:20:54 +02:00
'meilisearch',
2021-04-17 00:26:33 +02:00
'pi_results',
'LLL:EXT:meilisearch/Resources/Private/Language/locallang.xlf:tt_content.list_type_pi_results'
);
$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:meilisearch/Configuration/FlexForms/Results.xml'
);