phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
CheckboxTrait.php
Go to the documentation of this file.
1<?php
2
4
8
14
15 abstract public function addToPropertyCtrl($name, $value, $typeCtrl);
16
17 public function setType($checkboxType) {
18 return $this->getHtmlCk()->addToPropertyCtrl("class", $checkboxType, CheckboxType::getConstants());
19 }
20
21
28 public function attachEvent($selector, $action=NULL) {
29 return $this->getHtmlCk()->attachEvent($selector, $action);
30 }
31
37 public function attachEvents($events=array()) {
38 return $this->getHtmlCk()->attachEvents($events);
39 }
40
41 public function getField(){
42 return $this->content["field"];
43 }
44
45 public function getHtmlCk(){
46 return $this->content["field"];
47 }
48
49 public function setName($name){
50 $this->getDataField()->setProperty("name", $name);
51 return $this;
52 }
53
54 public function getDataField(){
55 $field= $this->getField();
56 if($field instanceof AbstractCheckbox)
57 $field=$field->getField();
58 return $field;
59 }
60
66 public function setChecked($value=true){
67 if($value===true){
68 $this->getDataField()->setProperty("checked", "checked");
69 }else{
70 $this->getDataField()->removeProperty("checked");
71 }
72 return $this;
73 }
74
75}
static getConstants()
Definition BaseEnum.php:17
attachEvent($selector, $action=NULL)
Attach $this to $selector and fire $action.
attachEvents($events=array())
Attach $this to an array of $action=>$selector.