1 | <?php |
||
8 | abstract class AbstractCheckbox extends HtmlSemDoubleElement { |
||
9 | protected $_params=array (); |
||
10 | |||
11 | public function __construct($identifier, $name=NULL, $label=NULL, $value=NULL, $inputType="checkbox", $type="checkbox") { |
||
19 | |||
20 | public function setType($checkboxType) { |
||
23 | |||
24 | public function setLabel($label) { |
||
33 | |||
34 | public function setField($field) { |
||
37 | |||
38 | /** |
||
39 | * Returns the label or null |
||
40 | * @return mixed |
||
41 | */ |
||
42 | public function getLabel() { |
||
46 | |||
47 | /** |
||
48 | * Return the field |
||
49 | * @return mixed |
||
50 | */ |
||
51 | public function getField() { |
||
54 | |||
55 | /** |
||
56 | * puts the label before or behind |
||
57 | */ |
||
58 | public function swapLabel() { |
||
63 | |||
64 | public function setReadonly() { |
||
68 | |||
69 | /** |
||
70 | * Attach $this to $selector and fire $action |
||
71 | * @param string $selector jquery selector of the associated element |
||
72 | * @param string $action action to execute : check, uncheck or NULL for toggle |
||
73 | * @return \Ajax\semantic\html\collections\form\AbstractHtmlFormRadioCheckbox |
||
74 | */ |
||
75 | public function attachEvent($selector, $action=NULL) { |
||
84 | |||
85 | /** |
||
86 | * Attach $this to an array of $action=>$selector |
||
87 | * @param array $events associative array of events to attach ex : ["#bt-toggle","check"=>"#bt-check","uncheck"=>"#bt-uncheck"] |
||
88 | * @return \Ajax\semantic\html\collections\form\AbstractHtmlFormRadioCheckbox |
||
89 | */ |
||
90 | public function attachEvents($events=array()) { |
||
98 | } |