trueprogramming / tca-select-items
添加 TCA 项数组 API
1.0.0
2023-09-22 10:16 UTC
Requires
- php: >8.1
- typo3/cms-core: ^12.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- saschaegerer/phpstan-typo3: ^1.9
- typo3/coding-standards: ^0.7.1
README
Author: Michael Semle
E-Mail: git@mikeproduction.de
repo: https://github.com/true-programming/tca-select-items
本扩展为 TCA 选择项提供辅助功能。对于初学者来说,通过数组参数添加 TCA 项可能有些令人沮丧。使用本扩展及其选择项模型类,无需记住正确的数组使用方法。
用法
例如,对于 tt_content CType
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
(new \Trueprogramming\TcaSelectItems\TCA\TCASelectItem(
'My awesom select item',
'awesom_select_item',
'EXT:awesom_extension/Resources/Public/Icons/Extension.svg',
'group-awesome'
))->toArray()
);
如何安装此扩展?
您可以通过 composer 设置它(composer require trueprogramming/tca-select-items
)。
要求
- TYPO3 v12。
许可证
扩展基于 GPL v2+ 许可,与 TYPO3 核心相同。
有关详细信息,请参阅本存储库中的 LICENSE 文件。