checkbox 检查器类型在界面中以复选框的形式表示. 此属性没有任何特殊参数. default 参数, 如果指定, 应该包含布尔值或字符串值 true, false, 1, 0.
public function defineProperties()
{
return [
'enabled' => [
'title' => 'Enabled',
'type' => 'checkbox',
'default' => true
]
];
}生成的输出为 0 (未选中) 或 1 (选中),例如:
"enabled": 1以下 配置值 常用。
| Property | Description |
|---|---|
| title | title for the property. |
| description | a brief description of the property, optional. |
| default | specifies a default as true or false, optional. |