pti/pti-forms
最新稳定版本:v4.0.1
Composer 安装命令:
composer require pti/pti-forms
包简介
README 文档
README
Helper classes to render extbase forms in a PTI context. The classes act as replacements for the fluid view helpers:
- AbstractFormFieldViewHelper
- FormViewHelper
Their main concern is to render the correct field names for the form fields and the hidden fields that extbase requires to accept the form submission.
Sample usage
$form = GeneralUtility::makeInstance(Form::class); $form->setRequest($this->request); $form->setObjectName('contactForm'); // optional $messageField = GeneralUtility::makeInstance(TextArea::class); $messageField->setProperty('message'); $form->addField($messageField) $form = $form->render(); /* [ 'fields' => [ 'message' => [ 'name' => 'tx_extension_plugin[contactForm][message]', 'value' => '', ], ], 'hiddenFields' => [ [ 'name' => 'tx_extension_plugin[__referrer][@extension]', 'value' => 'Extension' ], [ 'name' => 'tx_extension_plugin[__trustedProperties]', 'value' => '…', ], … ], ] */ $form['action'] = … $form['method'] = …
Most extensions will extend the Field class to create select fields, textareas, etc.
统计信息
- 总下载量: 57
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2024-08-29