FormWidget
class FormWidget extends FormPlugin
Form 表单
Traits
Properties
protected string | $title | 表单标题 | from FormPlugin |
protected Collection | $items | 表单内的表单条目集合 | from FormPlugin |
protected array | $model | 模型数据 | from FormPlugin |
protected Fluent | $attrs | 表单属性 | from FormPlugin |
protected array | $buttons | 可用的按钮 | from FormPlugin |
Methods
表单域标签的宽度,例如 '50px'。 作为 Form 直接子元素的 form-item 会继承该值。 支持 auto
Generate items and append to form list
No description
No description
No description
No description
初始化 widget 的信息
返回表单的结构 规则解析参考 : https://github.com/yiminghe/async-validator
Details
in
PoppyTrait at line 41
protected AuthManager
pyAuth()
get auth
in
PoppyTrait at line 50
protected Translator
pyTranslator()
get translator
in
PoppyTrait at line 60
protected Repository
pyConfig()
Get configuration instance.
in
PoppyTrait at line 70
protected DatabaseManager
pyDb()
get db
in
PoppyTrait at line 79
protected Kernel
pyConsole()
Get console instance.
in
PoppyTrait at line 88
protected Container
pyContainer()
Get IoC Container.
in
PoppyTrait at line 97
protected Mailer
pyMailer()
Get mailer instance.
in
PoppyTrait at line 106
protected SessionManager|Store
pySession()
Get session instance.
in
PoppyTrait at line 115
protected Request
pyRequest()
get request
in
PoppyTrait at line 125
protected Redirector
pyRedirector()
get redirector
in
PoppyTrait at line 134
protected Factory
pyValidation()
get validation
in
PoppyTrait at line 144
protected Dispatcher
pyEvent()
get event
in
PoppyTrait at line 154
protected LoggerInterface
pyLogger()
get logger
in
PoppyTrait at line 164
protected ResponseFactory
pyResponse()
get response
in
PoppyTrait at line 174
protected Filesystem
pyFile()
get file
in
PoppyTrait at line 184
protected UrlGenerator
pyUrl()
get url
in
PoppyTrait at line 195
protected mixed
pyCache(string $tag = '')
get cache
in
PoppyTrait at line 209
protected RedisManager
pyRedis()
get redis
in
PoppyTrait at line 218
protected Factory
pyView()
get view
in
PoppyTrait at line 227
protected Poppy
pyPoppy()
get poppy
in
PoppyTrait at line 236
protected Ini
pyIni()
Ini Parser
in
PoppyTrait at line 245
protected Xml
pyXml()
Ini Parser
in
PoppyTrait at line 254
protected Yaml
pyYaml()
Yaml Parser
in
UseQuery at line 16
protected bool
queryHas(string $query, string $type)
检测查询类型是否存在
in
UseQuery at line 31
protected string
queryAfter(string $query, string $type)
检测查询类型是否存在
in
FormPlugin at line 136
__construct()
Form constructor.
in
FormPlugin at line 150
labelWidth(string $width)
表单域标签的宽度,例如 '50px'。 作为 Form 直接子元素的 form-item 会继承该值。 支持 auto
in
FormPlugin at line 159
FormPlugin
disableReset()
Disable reset button.
in
FormPlugin at line 170
FormPlugin
disableSubmit()
Disable submit button.
in
FormPlugin at line 181
FormPlugin
inline()
行内表单模式, 取消自动宽度, 进行宽度自适应
in
FormPlugin at line 194
FormPlugin
disabled(bool $value)
是否禁用该表单内的所有组件。 若设置为 true,则表单内组件上的 disabled 属性不再生效
in
FormPlugin at line 205
FormPlugin
addItem(FormItem $item)
向服务器添加字段
in
FormPlugin at line 215
Collection
items($type = '')
获取表单的所有字段
in
FormPlugin at line 233
FormItem|$this
__call(string $method, array $arguments = [])
Generate items and append to form list
in
FormPlugin at line 251
FormPlugin
title(string $value)
设置表单的标题
in
FormPlugin at line 263
bool|MessageBag
validate(array $input = [])
Validate this form fields.
in
FormPlugin at line 290
array
struct($query)
返回表单的结构化数据
in
FormPlugin at line 320
array
frame()
返回结构化的数据
in
FormPlugin at line 357
array
model()
返回模型数据
in
FormPlugin at line 369
FormPlugin
fill(array $data = [])
Fill data to form fields.
in
FormPlugin at line 97
Table
table(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
EzTable
ezTable(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Text
text(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Textarea
textarea(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Url
url(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Password
password(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Mobile
mobile(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Ip
ip(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Decimal
decimal(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Cascader
cascader(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Currency
currency(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Email
email(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Number
number(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Radio
radio(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Checkbox
checkbox(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Select
select(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
MultiSelect
multiSelect(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Tags
tags(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Color
color(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Year
year(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Month
month(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Date
date(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Datetime
datetime(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Time
time(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
DateRange
dateRange(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
MonthRange
monthRange(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
DatetimeRange
datetimeRange(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
TimeRange
timeRange(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
OnOff
onOff(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Image
image(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
File
file(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
MultiImage
multiImage(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
MultiFile
multiFile(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Editor
editor(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Dynamic
dynamic(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Divider
divider(mixed $label)
No description
in
FormPlugin at line 97
Code
code(mixed $name, mixed $label)
No description
in
FormPlugin at line 97
Actions
actions(mixed $name, mixed $label)
No description
at line 27
form()
No description
at line 32
FormWidget
with($data = [])
No description
at line 40
FormWidget
on(Closure $cb)
No description
at line 46
handle()
No description
at line 54
array
data()
No description
at line 66
FormWidget
initWidget()
初始化 widget 的信息
at line 78
JsonResponse|RedirectResponse|Response
resp()
返回表单的结构 规则解析参考 : https://github.com/yiminghe/async-validator