[BUGFIX] Adds search form to new CE wizard 53/49753/5
authorTomita Militaru <militarutomita@gmail.com>
Fri, 2 Sep 2016 12:07:45 +0000 (14:07 +0200)
committerFrans Saris <franssaris@gmail.com>
Sat, 3 Sep 2016 12:50:26 +0000 (14:50 +0200)
Adds the new extbase / fluid indexed search form / result
content element in the new content element wizard

Resolves: #77769
Releases: master
Change-Id: I8e314b4e98eb190489262fe1c0b10ac954e5a324
Reviewed-on: https://review.typo3.org/49753
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
typo3/sysext/indexed_search/ext_localconf.php

index 1182220..fcc98a2 100644 (file)
@@ -71,6 +71,24 @@ if (isset($extConf['useMysqlFulltext']) && $extConf['useMysqlFulltext'] === '1')
         'index_phash,index_fulltext,index_rel,index_words,index_section,index_grlist,index_stat_search,index_stat_word,index_debug,index_config';
 }
 
+// Add search to new content element wizard
+if (TYPO3_MODE === 'BE') {
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
+    mod.wizards.newContentElement.wizardItems.forms {
+        elements.search {
+            iconIdentifier = content-elements-searchform
+            title = LLL:EXT:indexed_search/Resources/Private/Language/locallang_pi.xlf:pi_wizard_title
+            description = LLL:EXT:indexed_search/Resources/Private/Language/locallang_pi.xlf:pi_wizard_description
+            tt_content_defValues {
+                CType = list
+                list_type = indexedsearch_pi2
+            }
+        }
+        show :=addToList(search)
+    }
+    ');
+}
+
 // Use the advanced doubleMetaphone parser instead of the internal one (usage of metaphone parsers is generally disabled by default)
 if (isset($extConf['enableMetaphoneSearch']) && (int)$extConf['enableMetaphoneSearch'] == 2) {
     $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['metaphone'] = \TYPO3\CMS\IndexedSearch\Utility\DoubleMetaPhoneUtility::class;