Total Complexity | 2 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class KnockoutForm extends \SilverStripe\Forms\Form |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * $submit |
||
14 | * |
||
15 | * @var string the javascript function to run upon a click/enter event |
||
16 | */ |
||
17 | protected $submit; |
||
18 | |||
19 | /** |
||
20 | * casting of variables for security purposes |
||
21 | * |
||
22 | * @see http://docs.silverstripe.org/en/3.1/developer_guides/security/secure_coding/ |
||
23 | */ |
||
24 | protected $casting = array( |
||
25 | "Submit" => "Varchar" |
||
26 | ); |
||
27 | |||
28 | /** |
||
29 | * setSubmit |
||
30 | * |
||
31 | * @param string $input The javascript function called upon form submit |
||
32 | * @return $this |
||
33 | */ |
||
34 | public function setSubmit($input) |
||
35 | { |
||
36 | $this->submit = (string)$input; |
||
37 | return $this; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * getSubmit |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | public function getSubmit() |
||
48 | } |
||
49 | } |
||
50 |