swilson1337/yii2-wizard
Composer 安装命令:
composer require swilson1337/yii2-wizard
包简介
Yii2 extension to handle multi-form wizards
README 文档
README
Yii2 Extension to handle multi-form wizards.
Features
- All forms submit to the same route - user friendly URLs
- Next/Previous or Forward Only navigation - registration forms will probably use Next/Previous navigation; tests will probably use Forward Only
- Looping - repeat one or more steps on a form as many times as needed
- Plot Branching Navigation (PBN) - allows the form to decide which path to take depending on a user's response to questions
- Step timeout - steps can have a timeout to ensure a user responds within a given time
- Save/Restore - save partially completed forms then restore and continue from that point later
- Event driven - write the handler functions and hook them up to events
For license information see the LICENSE-file.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist beastbytes/yii2-wizard
or add
"beastbytes/yii2-wizard": "*"
to the require section of your composer.json.
Usage
Below is a very short overview of how to use the extension; the examples folder shows how to implement PBN, looping, forward only navigation, and step timeout in examples of a quiz, survey, and registration.
Attach WizardBehavior to a controller.
The controller contains the event handlers; the two most important events are WizardBehavior::EVENT_WIZARD_STEP and WizardBehavior::EVENT_AFTER_WIZARD, these are responsible for handling the steps of the wizard and processing the data at the end of the wizard respectively.
Controller Action
The controller action is very simple:
public function actionWizard($step = null) { return $this->step($step); }
WizardBehavior::EVENT_WIZARD_STEP
This event's handler is responsible for validating submitted data and deciding in what direction the Wizard should proceed; this and the data to be stored is placed into the event. When the event is marked as handled by handler the wizard will take the appropriate action.
WizardBehavior::EVENT_AFTER_WIZARD
The handler for this event is responsible for taking the required action once the Wizard has completed; this could be rendering a page based on the user input and/or saving the data to persistant storage.
swilson1337/yii2-wizard 适用场景与选型建议
swilson1337/yii2-wizard 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 70 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 01 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「form」 「wizard」 「Forms」 「Behavior」 「yii2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 swilson1337/yii2-wizard 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 swilson1337/yii2-wizard 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 swilson1337/yii2-wizard 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Provides methods to create, validate and render HTML forms in PHP.
ConfirmationField is a form field for Atk14 applications. It's like the BooleanField (checkbox) but the ConfirmationField must be ticked.
Field for number with restricted count of digits and decimal places
Site generator / tree model duplicator used to generate mini-website or duplicate tree model
Diese Contao 4 Erweiterung stellt Google reCAPTCHA V2 in Form eines neuen Formularfeldes im Formulargenerator bereit. This extension provides Google reCAPTCHA V2 in the form of a new form field in the form generator of Contao Open Source CMS.
HTML and form generation
统计信息
- 总下载量: 70
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2019-01-11