Last active
March 22, 2018 11:37
-
-
Save alrnz/c0f00b196d378f5b9150 to your computer and use it in GitHub Desktop.
Integrate Flexform for Plugin TYPO3 (6.2, too)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Vendor\Exampleext\Controller; | |
/* ... */ | |
/** | |
* ExampleController | |
*/ | |
class ExampleController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { | |
/** | |
* action list | |
* | |
* @return void | |
*/ | |
public function listAction() { | |
$this->view->assign('program', $this->settings['number']); | |
// ... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// .... | |
// Include flex forms | |
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_' . 'LOWERCASE_PLUGINNAME'; // from registerPlugin(...) | |
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform'; | |
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( | |
$pluginSignature, | |
'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/setup.xml' | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<T3DataStructure> | |
<sheets> | |
<sDEF> | |
<ROOT> | |
<TCEforms> | |
<sheetTitle>Flexform für Typo3 Extbase</sheetTitle> | |
</TCEforms> | |
<type>array</type> | |
<el> | |
<switchableControllerActions> | |
<TCEforms> | |
<label>Standardaktion des Plugins</label> | |
<config> | |
<type>select</type> | |
<items> | |
<numIndex index="0"> | |
<numIndex index="0">Listenansicht</numIndex> | |
<numIndex index="1">MyController->list</numIndex> | |
</numIndex> | |
<numIndex index="1"> | |
<numIndex index="0">Einzelansicht</numIndex> | |
<numIndex index="1">MyController->show;MyController->edit</numIndex> | |
</numIndex> | |
</items> | |
</config> | |
</TCEforms> | |
</switchableControllerActions> | |
<settings.program> | |
<TCEforms> | |
<label>LLL:EXT:szshareform/Resources/Private/Language/locallang_db.xlf:tx_szshareform_domain_model_story.program</label> | |
<config> | |
<type>select</type> | |
<foreign_table>tx_szshareform_domain_model_program</foreign_table> | |
<minitems>0</minitems> | |
<maxitems>1</maxitems> | |
</config> | |
</TCEforms> | |
</settings.program> | |
</el> | |
</ROOT> | |
</sDEF> | |
</sheets> | |
</T3DataStructure> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment