Total Complexity | 1 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class KnockoutCheckboxField extends CheckboxField |
||
15 | { |
||
16 | use \AntonyThorpe\Knockout\Common; |
||
17 | |||
18 | /** |
||
19 | * bindingType |
||
20 | * |
||
21 | * @var string a data-bind attribute key |
||
22 | * @example <input data-bind="checked: wantSpam" /> |
||
23 | */ |
||
24 | protected $bindingType = 'checked'; |
||
25 | |||
26 | /** |
||
27 | * casting of variables for security purposes |
||
28 | * |
||
29 | * @see http://docs.silverstripe.org/en/3.1/developer_guides/security/secure_coding/ |
||
30 | */ |
||
31 | protected $casting = array( |
||
32 | "Observable" => "Varchar", |
||
33 | "BindingType" => "Varchar", |
||
34 | "OtherBindings" => "Varchar", |
||
35 | "HasFocus" => "Boolean" |
||
36 | ); |
||
37 | |||
38 | /** |
||
39 | * Constructor |
||
40 | * |
||
41 | * @param string $name The field name |
||
42 | * @param string $title The field title |
||
43 | * @param mixed $value The current value |
||
44 | */ |
||
45 | public function __construct($name, $title = null, $value = '') |
||
51 |