debug function for extension development
7. July 2017
\TYPO3\CMS\Core\Utility\DebugUtility::debug($varToDebug);
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($varToDebug);
use TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser;
$queryParser = $this->objectManager->get(Typo3DbQueryParser::class);
DebuggerUtility::var_dump(
$queryParser->convertQueryToDoctrineQueryBuilder($query)->getSQL()
);
choose controller action with flexform (switchableControllerActions)
27. April 2016
<?xml version="1.0" encoding="UTF-8"?> <T3DataStructure> <sheets> <general> <ROOT> <TCEforms> <sheetTitle>XXX</sheetTitle> </TCEforms> <type>array</type> <el> <switchableControllerActions> <TCEforms> <label>Views</label> <onChange>reload</onChange> <config> <type>select</type> <items type="array"> <numIndex index="1" type="array"> <numIndex index="0">First view</numIndex> <numIndex index="1">Controller->action;Controller->actionFromExtLocalconf1;Controller->actionFromExtLocalconf2; </numIndex> </numIndex> <numIndex index="2" type="array"> <numIndex index="0">Second view</numIndex> <numIndex index="1">Controller->action1</numIndex> </numIndex> </items> </config> </TCEforms> </switchableControllerActions> </el> </ROOT> </general> </sheets> </T3DataStructure>
configuration from ext_localconf.php will be overwritten! If you need it, put it like line20 after “;”
Flexform for extbase extension
26. April 2016
$extensionName = strtolower(\TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY));
$pluginName = strtolower('Pluginname');
$pluginSignature = $extensionName.'_'.$pluginName;
/**
* Disable non needed fields in tt_content
*/
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'layout,select_key,pages,recursive';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:'.$_EXTKEY . '/Configuration/FlexForms/flexform.xml');
Use your own labels for TYPO3 login form (felogin)
19. September 2014
plugin.tx_felogin_pi1._LOCAL_LANG.de {
ll_welcome_header = Usereranmeldung
ll_welcome_message = Bitte melden Sie sich an!
}
order of new backend fields on existing tables
9. December 2013
thx to TYPO3-Blog
t3lib_extMgm::addToAllTCAtypes('tt_address', 'tx_myfield', '1,4,5 ', 'before:name');
TemplaVoila patch
6. August 2013
http://forge.typo3.org/attachments/23132/43554.patch
in classes/class.tx_templavoila_file.php
94 – return self::is_xmlFile($filename);
94 + return self::is_xmlFile_finfo($filename);
indexed_search browsebox2 with browseresults_display
8. July 2013
under TYPO3 4.5.x class.tx_indexedsearch.php in typo3/sysext/indexed_search/pi
diff origin_class* class.tx_indexedsearch.php 684c684,685 < $browseBox2 = $this->pi_list_browseresults(0,'','',$freeIndexUid); --- > $browseBox2 = $this->pi_list_browseresults(1,$addString,$this->printResultSectionLinks(),$freeIndexUid);
under TYPO3 6.2.x SearchFormController.php in typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php
681 < $browseBox2 = $this->pi_list_browseresults(0,'','',$freeIndexUid); --- > $browseBox2 = $this->pi_list_browseresults(1, $addString, $this->printResultSectionLinks(), $freeIndexUid);
using class tslib_cObj and parseFunc() in own class
8. February 2012
require_once(PATH_t3lib.'class.t3lib_tcemain.php');
$cObj = t3lib_div::makeInstance('tslib_cObj');
$tparseFunc = $GLOBALS['TSFE']->tmpl->setup['lib.']['parseFunc_RTE.'];
$cObj->parseFunc($stellenangebot['anforderungen'],$tparseFunc);
selectbox foreign table plugin flexform
26. July 2011
<category>
<TCEforms>
<exclude>1</exclude>
<label>Projektkategorie:</label>
<config>
<type>select</type>
<items>
<numIndex index="0" type="array">
<numIndex index="0">Bitte Wählen</numIndex>
<numIndex index="1"></numIndex>
</numIndex>
</items>
<foreign_table>tx_bbshowroom_categories</foreign_table>
<foreign_table_where> ORDER BY tx_bbshowroom_categories.uid DESC</foreign_table_where>
<size>1</size>
<min>1</min>
<max>1</max>
</config>
</TCEforms>
</category>
using TYPO3 diff-function in frontend extensions
3. June 2011
$t3lib_diff_Obj = t3lib_div::makeInstance('t3lib_diff');
$differenz = $t3lib_diff_Obj->makeDiffDisplay($text1, $text2);
$differenz = nl2br($differenz);