codappix/typo3-php-flexforms
最新稳定版本:v1.0.0
Composer 安装命令:
composer require codappix/typo3-php-flexforms
包简介
Enables usage of PHP FlexForms withing TYPO3.
README 文档
README
Provides APIs to use FlexForms written as PHP arrays within TYPO3.
Why
We don't like the approach of TYPO3 FlexForms written in XML.
XML is hard to read, extend, test and maintain.
That's why we prefer PHP files instead. That way developers are free to use whatever they want. Either plain PHP or even YAML or other formats. They are not forced to anything but can stick to their known tooling.
So this package should in general handle PHP FlexForms for TYPO3.
The benefits we see:
- field definitions are similar to TCA
- use static code analysis software like PHPstan to validate dependencies
- use our standard coding guideline fixer
- make use of includes or builder classes for common fields
- easier override of existing PHP FlexForms through include and array merge
- use ENUMs for select items
Usage
See our own tests for how to use, as they do nothing else.
Create a FlexForm
A FlexForm is a PHP file that returns an array.
We have different examples in our test fixtures. Have a look to
Test/Fixtures/Configuration/FlexForms/Use the path to the PHP FlexForm file instead of the XML.
$GLOBALS['TCA'] = [
'tt_content' => [
'columns' => [
'pi_flexform' => [
'config' => [
'ds' => [
'*,typo3_php_flexform_test' => 'EXT:typo3_php_flexforms/Tests/Fixtures/Configuration/FlexForms/withOneSheet/input.php',
],
],
],
],
],
];
TODO
- We will abstract the syntax for sections within a sheet, so we get rid of
'section' => '1',
'type' => 'array',
'el' => [
// some field definitions
],
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-05-20