hn/formsave 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hn/formsave

Composer 安装命令:

composer require hn/formsave

包简介

Saves data of ext:form in a usable state

README 文档

README

Latest Stable Version Total Downloads Monthly Downloads License

This extension allow to easily create domain models from form data.

basic usage

  • install using composer require hn/formsave
  • create a form and add the Formsave finisher, select Generic as intent
  • optionally add identifier to each field

advanced usage

You can add own intents which also creates own domain objects. Lets go with an exampe of an "Application".

Create a domain model class Vendor\Extension\Domain\Model\Application

<?php

namespace Vendor\Extension\Domain\Model;

use Hn\Formsave\Domain\Model\Document;

class Application extends Document
{

}

Implement extbase inheritence

Use the ext_typoscript_setup.txt for that.

config.tx_extbase.persistence.classes {
    Hn\Formsave\Domain\Model\Document {
        subclasses {
            Vendor\Extension\Domain\Model\Application = Vendor\Extension\Domain\Model\Application
        }
    }

    Vendor\Extension\Domain\Model\Application {
        mapping {
            recordType = Vendor\Extension\Domain\Model\Application
            tableName = tx_formsave_domain_model_document
        }
    }
}

Extend the select fields in the form editor and in TCA

// Configuration/TCA/Overrides/tx_formsave_domain_model_document.php

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tx_formsave_domain_model_document', 'type', [
    'Application',
    \Vendor\Extension\Domain\Model\Application::class,
]);
# Configuration/Form/FormEngineSetup.yaml

TYPO3:
  CMS:
    Form:
      prototypes:
        standard:
          formElementsDefinition:
            Form:
              formEditor:
                propertyCollections:
                  finishers:
                    1531314970:
                      editors:
                        110:
                          selectOptions:
                            1531319170:
                              value: 'Vendor\Extension\Domain\Model\Application'
                              label: 'Application'

Add Behavior to your formdata

Look into Hn\Formsave\Domain\Finisher\FormsaveFinisher. There are a few signals in which you can change the behavior. One example would be to send an email when a user applies.

统计信息

  • 总下载量: 5.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2018-07-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固