我有一个扩展,它使用itemproc函数来配置插件。
/Configuration/FlexForms/Config.xml:
<T3DataStructure>
<meta type="array">
<langChildren>0</langChildren>
<langDisable>1</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>Allgemein</sheetTitle>
</TCEforms>
<type>array</type>
<el>
:
<settings.auswahlKategorie>
<TCEforms>
<label>Anzuzeigende Kategorie wählen:</label>
<config>
<type>select</type>
<itemsProcFunc>Company\myextension\UserFunc\ItemsProcFunc->getCategoryList</itemsProcFunc>
</config>
</TCEforms>
</settings.auswahlKategorie>
:
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
在函数定义
中 /**
* Generiert die Liste der Kategorien.
*
* Wird für den Aufbau der "FlexForm" benötigt.
*
* @param string_array $config TYPO3 config array.
* @return string_array Angepasstes TYPO3 - Config array.
*/
public function getCategoryList($config) {
:
他们假设可以通过以下方式访问根页面:
$pageId = $config['flexParentDatabaseRow']['pid'];
访问typoscript配置:
$conf = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Company\\myextension\\Services\\Config');
$conf->setConfFromTsSetup($pageId);
但是没有值$config['flexParentDatabaseRow']['pid']
,所以提取了第0页的typoscript,其中没有typoscript。
如何提供正确的根页面ID(不修改外部公司的来源)?
答案 0 :(得分:0)
我非常确定他们的意思是您必须将配置添加到您的flexform配置中。
应该是这样的:
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script>
<svg width="960" height="600"></svg>
不确定这是正确的方法,但我非常确定<config>
<type>select</type>
<itemsProcFunc>Company\myextension\UserFunc\ItemsProcFunc->getCategoryList</itemsProcFunc>
<flexParentDatabaseRow>
<pid>1</pid>
</flexParentDatabaseRow>
</config>
是指如果使用TCA,则指向flexform或TCA设置的配置部分。
答案 1 :(得分:0)