@@ -6,26 +6,26 @@ discard block |
||
6 | 6 | use Ajax\semantic\html\content\HtmlAccordionItem; |
7 | 7 | use Ajax\JsUtils; |
8 | 8 | |
9 | -class HtmlAccordion extends HtmlSemCollection{ |
|
9 | +class HtmlAccordion extends HtmlSemCollection { |
|
10 | 10 | |
11 | 11 | protected $params=array(); |
12 | 12 | |
13 | - public function __construct( $identifier, $tagName="div", $baseClass="ui"){ |
|
14 | - parent::__construct( $identifier, "div", "ui accordion"); |
|
13 | + public function __construct($identifier, $tagName="div", $baseClass="ui") { |
|
14 | + parent::__construct($identifier, "div", "ui accordion"); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | |
18 | - protected function createItem($value){ |
|
18 | + protected function createItem($value) { |
|
19 | 19 | $count=$this->count(); |
20 | 20 | $title=$value; |
21 | 21 | $content=NULL; |
22 | - if(\is_array($value)){ |
|
23 | - $title=@$value[0];$content=@$value[1]; |
|
22 | + if (\is_array($value)) { |
|
23 | + $title=@$value[0]; $content=@$value[1]; |
|
24 | 24 | } |
25 | - return new HtmlAccordionItem("item-".$this->identifier."-".$count, $title,$content); |
|
25 | + return new HtmlAccordionItem("item-".$this->identifier."-".$count, $title, $content); |
|
26 | 26 | } |
27 | 27 | |
28 | - protected function createCondition($value){ |
|
28 | + protected function createCondition($value) { |
|
29 | 29 | return ($value instanceof HtmlAccordionItem)===false; |
30 | 30 | } |
31 | 31 | |
@@ -34,22 +34,22 @@ discard block |
||
34 | 34 | * @see BaseHtml::run() |
35 | 35 | */ |
36 | 36 | public function run(JsUtils $js) { |
37 | - if(isset($this->_bsComponent)===false) |
|
38 | - $this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params); |
|
37 | + if (isset($this->_bsComponent)===false) |
|
38 | + $this->_bsComponent=$js->semantic()->accordion("#".$this->identifier, $this->params); |
|
39 | 39 | $this->addEventsOnRun($js); |
40 | 40 | return $this->_bsComponent; |
41 | 41 | } |
42 | 42 | |
43 | - public function setStyled(){ |
|
43 | + public function setStyled() { |
|
44 | 44 | return $this->addToProperty("class", "styled"); |
45 | 45 | } |
46 | 46 | |
47 | - public function setActive($index){ |
|
47 | + public function setActive($index) { |
|
48 | 48 | $this->getItem($index)->setActive(true); |
49 | 49 | return $this; |
50 | 50 | } |
51 | 51 | |
52 | - public function setExclusive($value){ |
|
52 | + public function setExclusive($value) { |
|
53 | 53 | $this->params["exclusive"]=$value; |
54 | 54 | } |
55 | 55 | } |
56 | 56 | \ No newline at end of file |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @param string $onClick JS Code for click event |
24 | 24 | */ |
25 | 25 | public function __construct($identifier, $value="", $cssStyle=null, $onClick=null) { |
26 | - parent::__construct($identifier, "button","ui button"); |
|
26 | + parent::__construct($identifier, "button", "ui button"); |
|
27 | 27 | $this->content=$value; |
28 | 28 | if (isset($cssStyle)) { |
29 | 29 | $this->setStyle($cssStyle); |
@@ -49,28 +49,28 @@ discard block |
||
49 | 49 | * @return \Ajax\semantic\html\HtmlButton default : "" |
50 | 50 | */ |
51 | 51 | public function setStyle($cssStyle) { |
52 | - return $this->addToProperty("class",$cssStyle); |
|
52 | + return $this->addToProperty("class", $cssStyle); |
|
53 | 53 | } |
54 | 54 | |
55 | - public function setFocusable($value=true){ |
|
56 | - if($value===true) |
|
55 | + public function setFocusable($value=true) { |
|
56 | + if ($value===true) |
|
57 | 57 | $this->setProperty("tabindex", "0"); |
58 | - else{ |
|
58 | + else { |
|
59 | 59 | $this->removeProperty("tabindex"); |
60 | 60 | } |
61 | 61 | return $this; |
62 | 62 | } |
63 | 63 | |
64 | - public function setAnimated($content,$animation=""){ |
|
64 | + public function setAnimated($content, $animation="") { |
|
65 | 65 | $this->setTagName("div"); |
66 | 66 | $this->addToProperty("class", "animated ".$animation); |
67 | - $visible=new HtmlSemDoubleElement("visible-".$this->identifier,"div"); |
|
67 | + $visible=new HtmlSemDoubleElement("visible-".$this->identifier, "div"); |
|
68 | 68 | $visible->setClass("visible content"); |
69 | 69 | $visible->setContent($this->content); |
70 | - $hidden=new HtmlSemDoubleElement("hidden-".$this->identifier,"div"); |
|
70 | + $hidden=new HtmlSemDoubleElement("hidden-".$this->identifier, "div"); |
|
71 | 71 | $hidden->setClass("hidden content"); |
72 | 72 | $hidden->setContent($content); |
73 | - $this->content=array($visible,$hidden); |
|
73 | + $this->content=array($visible, $hidden); |
|
74 | 74 | return $hidden; |
75 | 75 | } |
76 | 76 | |
@@ -78,9 +78,9 @@ discard block |
||
78 | 78 | * @param string|HtmlIcon $icon |
79 | 79 | * @return \Ajax\semantic\html\elements\HtmlButton |
80 | 80 | */ |
81 | - public function asIcon($icon){ |
|
81 | + public function asIcon($icon) { |
|
82 | 82 | $iconO=$icon; |
83 | - if(\is_string($icon)){ |
|
83 | + if (\is_string($icon)) { |
|
84 | 84 | $iconO=new HtmlIcon("icon-".$this->identifier, $icon); |
85 | 85 | } |
86 | 86 | $this->addToProperty("class", "icon"); |
@@ -88,8 +88,8 @@ discard block |
||
88 | 88 | return $this; |
89 | 89 | } |
90 | 90 | |
91 | - public function asSubmit(){ |
|
92 | - $this->setProperty("type","submit"); |
|
91 | + public function asSubmit() { |
|
92 | + $this->setProperty("type", "submit"); |
|
93 | 93 | return $this->setTagName("button"); |
94 | 94 | } |
95 | 95 | |
@@ -99,14 +99,14 @@ discard block |
||
99 | 99 | * @param string $before |
100 | 100 | * @return \Ajax\semantic\html\elements\HtmlLabel |
101 | 101 | */ |
102 | - public function addLabel($caption,$before=false){ |
|
102 | + public function addLabel($caption, $before=false) { |
|
103 | 103 | $this->tagName="div"; |
104 | 104 | $this->addToProperty("class", "labeled"); |
105 | - $this->content=new HtmlButton("button-".$this->identifier,$this->content); |
|
105 | + $this->content=new HtmlButton("button-".$this->identifier, $this->content); |
|
106 | 106 | $this->content->setTagName("div"); |
107 | - $label=new HtmlLabel("label-".$this->identifier,$caption,"a"); |
|
107 | + $label=new HtmlLabel("label-".$this->identifier, $caption, "a"); |
|
108 | 108 | $label->setBasic(); |
109 | - $this->addContent($label,$before); |
|
109 | + $this->addContent($label, $before); |
|
110 | 110 | return $label; |
111 | 111 | } |
112 | 112 | /* |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public function fromArray($array) { |
117 | 117 | $array=parent::fromArray($array); |
118 | - foreach ( $array as $key => $value ) { |
|
118 | + foreach ($array as $key => $value) { |
|
119 | 119 | $this->setProperty($key, $value); |
120 | 120 | } |
121 | 121 | return $array; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * show it is currently the active user selection |
126 | 126 | * @return \Ajax\semantic\html\elements\HtmlButton |
127 | 127 | */ |
128 | - public function setActive(){ |
|
128 | + public function setActive() { |
|
129 | 129 | return $this->addToProperty("class", "active"); |
130 | 130 | } |
131 | 131 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * hint towards a positive consequence |
134 | 134 | * @return \Ajax\semantic\html\elements\HtmlButton |
135 | 135 | */ |
136 | - public function setPositive(){ |
|
136 | + public function setPositive() { |
|
137 | 137 | return $this->addToProperty("class", "positive"); |
138 | 138 | } |
139 | 139 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | * hint towards a negative consequence |
142 | 142 | * @return \Ajax\semantic\html\elements\HtmlButton |
143 | 143 | */ |
144 | - public function setNegative(){ |
|
144 | + public function setNegative() { |
|
145 | 145 | return $this->addToProperty("class", "negative"); |
146 | 146 | } |
147 | 147 | |
@@ -149,14 +149,14 @@ discard block |
||
149 | 149 | * formatted to toggle on/off |
150 | 150 | * @return \Ajax\semantic\html\elements\HtmlButton |
151 | 151 | */ |
152 | - public function setToggle(){ |
|
152 | + public function setToggle() { |
|
153 | 153 | return $this->addToProperty("class", "toggle"); |
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |
157 | 157 | * @return \Ajax\semantic\html\elements\HtmlButton |
158 | 158 | */ |
159 | - public function setCircular(){ |
|
159 | + public function setCircular() { |
|
160 | 160 | return $this->addToProperty("class", "circular"); |
161 | 161 | } |
162 | 162 | |
@@ -164,22 +164,22 @@ discard block |
||
164 | 164 | * button is less pronounced |
165 | 165 | * @return \Ajax\semantic\html\elements\HtmlButton |
166 | 166 | */ |
167 | - public function setBasic(){ |
|
167 | + public function setBasic() { |
|
168 | 168 | return $this->addToProperty("class", "basic"); |
169 | 169 | } |
170 | 170 | |
171 | - public function setEmphasis($value){ |
|
171 | + public function setEmphasis($value) { |
|
172 | 172 | return $this->addToPropertyCtrl("class", $value, Emphasis::getConstants()); |
173 | 173 | } |
174 | 174 | |
175 | - public function setLoading(){ |
|
175 | + public function setLoading() { |
|
176 | 176 | return $this->addToProperty("class", "loading"); |
177 | 177 | } |
178 | 178 | |
179 | - public static function getSocial($identifier,$social,$value=NULL){ |
|
180 | - if($value===NULL) |
|
179 | + public static function getSocial($identifier, $social, $value=NULL) { |
|
180 | + if ($value===NULL) |
|
181 | 181 | $value=\ucfirst($social); |
182 | - $return=new HtmlButton($identifier,$value); |
|
182 | + $return=new HtmlButton($identifier, $value); |
|
183 | 183 | $return->addIcon($social); |
184 | 184 | return $return->addToPropertyCtrl("class", $social, Social::getConstants()); |
185 | 185 | } |
@@ -7,9 +7,9 @@ |
||
7 | 7 | |
8 | 8 | class HtmlFormInput extends HtmlFormField { |
9 | 9 | |
10 | - public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) { |
|
11 | - if(!isset($placeholder)) |
|
10 | + public function __construct($identifier, $label=NULL, $type="text", $value=NULL, $placeholder=NULL) { |
|
11 | + if (!isset($placeholder)) |
|
12 | 12 | $placeholder=$label; |
13 | - parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label); |
|
13 | + parent::__construct("field-".$identifier, new HtmlInput($identifier, $type, $value, $placeholder), $label); |
|
14 | 14 | } |
15 | 15 | } |
16 | 16 | \ No newline at end of file |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | * @param string $type one of text,item |
28 | 28 | * @return \Ajax\semantic\html\collections\HtmlMenu |
29 | 29 | */ |
30 | - public function setType($type=""){ |
|
31 | - return $this->addToPropertyCtrl("class", $type, array("","item","text")); |
|
30 | + public function setType($type="") { |
|
31 | + return $this->addToPropertyCtrl("class", $type, array("", "item", "text")); |
|
32 | 32 | } |
33 | 33 | |
34 | - public function setActiveItem($index){ |
|
34 | + public function setActiveItem($index) { |
|
35 | 35 | $item=$this->getItem($index); |
36 | - if($item!==null){ |
|
36 | + if ($item!==null) { |
|
37 | 37 | $item->addToProperty("class", "active"); |
38 | 38 | } |
39 | 39 | return $this; |
@@ -43,24 +43,24 @@ discard block |
||
43 | 43 | * {@inheritDoc} |
44 | 44 | * @see \Ajax\common\html\html5\HtmlCollection::addItem() |
45 | 45 | */ |
46 | - public function addItem($item){ |
|
47 | - if($item instanceof \Ajax\semantic\html\elements\HtmlInput){ |
|
48 | - $itemO=new HtmlSemDoubleElement("item-".$this->identifier,"div"); |
|
46 | + public function addItem($item) { |
|
47 | + if ($item instanceof \Ajax\semantic\html\elements\HtmlInput) { |
|
48 | + $itemO=new HtmlSemDoubleElement("item-".$this->identifier, "div"); |
|
49 | 49 | $itemO->setContent($item); |
50 | 50 | $item=$itemO; |
51 | 51 | } |
52 | 52 | $item=parent::addItem($item); |
53 | - if(!$item instanceof HtmlMenu) |
|
54 | - $item->addToPropertyCtrl("class", "item",array("item")); |
|
55 | - else{ |
|
53 | + if (!$item instanceof HtmlMenu) |
|
54 | + $item->addToPropertyCtrl("class", "item", array("item")); |
|
55 | + else { |
|
56 | 56 | $this->setSecondary(); |
57 | 57 | } |
58 | 58 | } |
59 | - public function generateMenuAsItem($menu,$header=null){ |
|
59 | + public function generateMenuAsItem($menu, $header=null) { |
|
60 | 60 | $count=$this->count(); |
61 | - $item=new HtmlSemDoubleElement("item-".$this->identifier."-".$count,"div"); |
|
62 | - if(isset($header)){ |
|
63 | - $headerItem=new HtmlSemDoubleElement("item-header-".$this->identifier."-".$count,"div","header"); |
|
61 | + $item=new HtmlSemDoubleElement("item-".$this->identifier."-".$count, "div"); |
|
62 | + if (isset($header)) { |
|
63 | + $headerItem=new HtmlSemDoubleElement("item-header-".$this->identifier."-".$count, "div", "header"); |
|
64 | 64 | $headerItem->setContent($header); |
65 | 65 | $item->addContent($headerItem); |
66 | 66 | } |
@@ -68,59 +68,59 @@ discard block |
||
68 | 68 | $item->addContent($menu); |
69 | 69 | return $item; |
70 | 70 | } |
71 | - public function addMenuAsItem($menu,$header=null){ |
|
72 | - return $this->addItem($this->generateMenuAsItem($menu,$header)); |
|
71 | + public function addMenuAsItem($menu, $header=null) { |
|
72 | + return $this->addItem($this->generateMenuAsItem($menu, $header)); |
|
73 | 73 | } |
74 | 74 | /** |
75 | 75 | * {@inheritDoc} |
76 | 76 | * @see \Ajax\common\html\html5\HtmlCollection::createItem() |
77 | 77 | */ |
78 | 78 | protected function createItem($value) { |
79 | - $itemO=new HtmlLink("item-".\sizeof($this->content),"",$value); |
|
79 | + $itemO=new HtmlLink("item-".\sizeof($this->content), "", $value); |
|
80 | 80 | return $itemO->setClass("item"); |
81 | 81 | } |
82 | 82 | |
83 | - public function setInverted(){ |
|
83 | + public function setInverted() { |
|
84 | 84 | return $this->addToProperty("class", "inverted"); |
85 | 85 | } |
86 | 86 | |
87 | - public function setSecondary(){ |
|
87 | + public function setSecondary() { |
|
88 | 88 | return $this->addToProperty("class", "secondary"); |
89 | 89 | } |
90 | 90 | |
91 | - public function setVertical(){ |
|
92 | - return $this->addToPropertyCtrl("class", "vertical",array("vertical")); |
|
91 | + public function setVertical() { |
|
92 | + return $this->addToPropertyCtrl("class", "vertical", array("vertical")); |
|
93 | 93 | } |
94 | 94 | |
95 | - public function setPosition($value="right"){ |
|
96 | - return $this->addToPropertyCtrl("class", $value,array("right","left")); |
|
95 | + public function setPosition($value="right") { |
|
96 | + return $this->addToPropertyCtrl("class", $value, array("right", "left")); |
|
97 | 97 | } |
98 | 98 | |
99 | - public function setPointing($value=Direction::NONE){ |
|
100 | - return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing")); |
|
99 | + public function setPointing($value=Direction::NONE) { |
|
100 | + return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing")); |
|
101 | 101 | } |
102 | 102 | |
103 | - public function asTab($vertical=false){ |
|
104 | - $this->apply(function(HtmlDoubleElement &$item){$item->setTagName("a");}); |
|
105 | - if($vertical===true) |
|
103 | + public function asTab($vertical=false) { |
|
104 | + $this->apply(function(HtmlDoubleElement & $item) {$item->setTagName("a"); }); |
|
105 | + if ($vertical===true) |
|
106 | 106 | $this->setVertical(); |
107 | 107 | return $this->addToProperty("class", "tabular"); |
108 | 108 | } |
109 | 109 | |
110 | - public function asPagination(){ |
|
111 | - $this->apply(function(HtmlDoubleElement &$item){$item->setTagName("a");}); |
|
110 | + public function asPagination() { |
|
111 | + $this->apply(function(HtmlDoubleElement & $item) {$item->setTagName("a"); }); |
|
112 | 112 | return $this->addToProperty("class", "pagination"); |
113 | 113 | } |
114 | 114 | |
115 | - public function setFixed(){ |
|
115 | + public function setFixed() { |
|
116 | 116 | return $this->addToProperty("class", "fixed"); |
117 | 117 | } |
118 | 118 | |
119 | - public function setFluid(){ |
|
119 | + public function setFluid() { |
|
120 | 120 | return $this->addToProperty("class", "fluid"); |
121 | 121 | } |
122 | 122 | |
123 | - public function setCompact(){ |
|
123 | + public function setCompact() { |
|
124 | 124 | return $this->addToProperty("class", "compact"); |
125 | 125 | } |
126 | 126 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function fromDatabaseObject($object, $function) { |
131 | 131 | $return=$function($object); |
132 | - if(\is_array($return)) |
|
132 | + if (\is_array($return)) |
|
133 | 133 | $this->addItems($return); |
134 | 134 | else |
135 | 135 | $this->addItem($return); |
@@ -12,15 +12,15 @@ discard block |
||
12 | 12 | * @author jc |
13 | 13 | * @version 1.001 |
14 | 14 | */ |
15 | -class HtmlLabeledIconMenu extends HtmlMenu{ |
|
15 | +class HtmlLabeledIconMenu extends HtmlMenu { |
|
16 | 16 | |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * @param string $identifier |
20 | 20 | * @param array $items icons |
21 | 21 | */ |
22 | - public function __construct( $identifier, $items=array()){ |
|
23 | - parent::__construct( $identifier, $items); |
|
22 | + public function __construct($identifier, $items=array()) { |
|
23 | + parent::__construct($identifier, $items); |
|
24 | 24 | $this->addToProperty("class", "labeled icon"); |
25 | 25 | } |
26 | 26 | |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | protected function createItem($value) { |
32 | 32 | $text=""; |
33 | 33 | $v=$value; |
34 | - if(\is_array($value)){ |
|
34 | + if (\is_array($value)) { |
|
35 | 35 | $v=@$value[0]; |
36 | 36 | $text=@$value[1]; |
37 | 37 | } |
38 | 38 | $count=\sizeof($this->content); |
39 | 39 | $value=new HtmlIcon("icon-".$count, $v); |
40 | - $value->wrap("",$text); |
|
41 | - $itemO=new HtmlLink("item-".$count,"",$value); |
|
40 | + $value->wrap("", $text); |
|
41 | + $itemO=new HtmlLink("item-".$count, "", $value); |
|
42 | 42 | return $itemO->setClass("item"); |
43 | 43 | } |
44 | 44 | } |
45 | 45 | \ No newline at end of file |
@@ -12,15 +12,15 @@ discard block |
||
12 | 12 | * @author jc |
13 | 13 | * @version 1.001 |
14 | 14 | */ |
15 | -class HtmlIconMenu extends HtmlMenu{ |
|
15 | +class HtmlIconMenu extends HtmlMenu { |
|
16 | 16 | |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * @param string $identifier |
20 | 20 | * @param array $items icons |
21 | 21 | */ |
22 | - public function __construct( $identifier, $items=array()){ |
|
23 | - parent::__construct( $identifier, $items); |
|
22 | + public function __construct($identifier, $items=array()) { |
|
23 | + parent::__construct($identifier, $items); |
|
24 | 24 | $this->addToProperty("class", "icon"); |
25 | 25 | } |
26 | 26 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | protected function createItem($value) { |
33 | 33 | $count=\sizeof($this->content); |
34 | 34 | $value=new HtmlIcon("icon-".$count, $value); |
35 | - $itemO=new HtmlLink("item-".$count,"",$value); |
|
35 | + $itemO=new HtmlLink("item-".$count, "", $value); |
|
36 | 36 | return $itemO->setClass("item"); |
37 | 37 | } |
38 | 38 | } |
39 | 39 | \ No newline at end of file |
@@ -6,11 +6,11 @@ discard block |
||
6 | 6 | use Ajax\semantic\html\content\HtmlAccordionMenuItem; |
7 | 7 | use Ajax\JsUtils; |
8 | 8 | |
9 | -class HtmlAccordionMenu extends HtmlMenu{ |
|
9 | +class HtmlAccordionMenu extends HtmlMenu { |
|
10 | 10 | protected $params=array(); |
11 | 11 | |
12 | - public function __construct( $identifier, $items=array() ){ |
|
13 | - parent::__construct( $identifier, $items); |
|
12 | + public function __construct($identifier, $items=array()) { |
|
13 | + parent::__construct($identifier, $items); |
|
14 | 14 | $this->addToProperty("class", "accordion"); |
15 | 15 | $this->setVertical(); |
16 | 16 | } |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | protected function createItem($value) { |
23 | 23 | $title=$value; |
24 | 24 | $content=""; |
25 | - if(\is_array($value)){ |
|
26 | - $title=@$value[0];$content=@$value[1]; |
|
25 | + if (\is_array($value)) { |
|
26 | + $title=@$value[0]; $content=@$value[1]; |
|
27 | 27 | } |
28 | 28 | $itemO=new HtmlAccordionMenuItem("item-".$this->identifier."-".$this->count(), $title, $content); |
29 | 29 | return $itemO->setClass("item"); |
@@ -34,13 +34,13 @@ discard block |
||
34 | 34 | * @see BaseHtml::run() |
35 | 35 | */ |
36 | 36 | public function run(JsUtils $js) { |
37 | - if(isset($this->_bsComponent)===false) |
|
38 | - $this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params); |
|
37 | + if (isset($this->_bsComponent)===false) |
|
38 | + $this->_bsComponent=$js->semantic()->accordion("#".$this->identifier, $this->params); |
|
39 | 39 | $this->addEventsOnRun($js); |
40 | 40 | return $this->_bsComponent; |
41 | 41 | } |
42 | 42 | |
43 | - public function setExclusive($value){ |
|
43 | + public function setExclusive($value) { |
|
44 | 44 | $this->params["exclusive"]=$value; |
45 | 45 | } |
46 | 46 | } |
47 | 47 | \ No newline at end of file |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @param string $identifier |
83 | 83 | * @param string $icon |
84 | 84 | */ |
85 | - public function htmlIcon($identifier,$icon){ |
|
85 | + public function htmlIcon($identifier, $icon) { |
|
86 | 86 | return $this->addHtmlComponent(new HtmlIcon($identifier, $icon)); |
87 | 87 | } |
88 | 88 | |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | * @param string $size |
92 | 92 | * @param array $icons |
93 | 93 | */ |
94 | - public function htmlIconGroups($identifier,$size="",$icons=array()){ |
|
95 | - $group=new HtmlIconGroups($identifier,$size); |
|
96 | - if(JArray::isAssociative($icons)){ |
|
97 | - foreach ($icons as $icon=>$size){ |
|
98 | - $group->add($icon,$size); |
|
94 | + public function htmlIconGroups($identifier, $size="", $icons=array()) { |
|
95 | + $group=new HtmlIconGroups($identifier, $size); |
|
96 | + if (JArray::isAssociative($icons)) { |
|
97 | + foreach ($icons as $icon=>$size) { |
|
98 | + $group->add($icon, $size); |
|
99 | 99 | } |
100 | - }else{ |
|
101 | - foreach ($icons as $icon){ |
|
100 | + }else { |
|
101 | + foreach ($icons as $icon) { |
|
102 | 102 | $group->add($icon); |
103 | 103 | } |
104 | 104 | } |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | * @param array $elements |
111 | 111 | * @param boolean $asIcons |
112 | 112 | */ |
113 | - public function htmlButtonGroups($identifier,$elements=array(),$asIcons=false){ |
|
114 | - return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements,$asIcons)); |
|
113 | + public function htmlButtonGroups($identifier, $elements=array(), $asIcons=false) { |
|
114 | + return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements, $asIcons)); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * @param string $identifier |
120 | 120 | * @param string $content |
121 | 121 | */ |
122 | - public function htmlContainer($identifier,$content=""){ |
|
122 | + public function htmlContainer($identifier, $content="") { |
|
123 | 123 | return $this->addHtmlComponent(new HtmlContainer($identifier, $content)); |
124 | 124 | } |
125 | 125 | |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | * @param string $identifier |
128 | 128 | * @param string $content |
129 | 129 | */ |
130 | - public function htmlDivider($identifier,$content="",$tagName="div"){ |
|
131 | - return $this->addHtmlComponent(new HtmlDivider($identifier, $content,$tagName)); |
|
130 | + public function htmlDivider($identifier, $content="", $tagName="div") { |
|
131 | + return $this->addHtmlComponent(new HtmlDivider($identifier, $content, $tagName)); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | /** |
@@ -136,8 +136,8 @@ discard block |
||
136 | 136 | * @param string $content |
137 | 137 | * @param string $tagName |
138 | 138 | */ |
139 | - public function htmlLabel($identifier,$content="",$tagName="div"){ |
|
140 | - return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$tagName)); |
|
139 | + public function htmlLabel($identifier, $content="", $tagName="div") { |
|
140 | + return $this->addHtmlComponent(new HtmlLabel($identifier, $content, $tagName)); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -145,24 +145,24 @@ discard block |
||
145 | 145 | * @param array $items |
146 | 146 | * @return Ajax\semantic\html\collections\HtmlMenu |
147 | 147 | */ |
148 | - public function htmlMenu($identifier,$items=array()){ |
|
149 | - return $this->addHtmlComponent(new HtmlMenu($identifier,$items)); |
|
148 | + public function htmlMenu($identifier, $items=array()) { |
|
149 | + return $this->addHtmlComponent(new HtmlMenu($identifier, $items)); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /**Adds an icon menu |
153 | 153 | * @param string $identifier |
154 | 154 | * @param array $items icons |
155 | 155 | */ |
156 | - public function htmlIconMenu($identifier,$items=array()){ |
|
157 | - return $this->addHtmlComponent(new HtmlIconMenu($identifier,$items)); |
|
156 | + public function htmlIconMenu($identifier, $items=array()) { |
|
157 | + return $this->addHtmlComponent(new HtmlIconMenu($identifier, $items)); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /**Adds an labeled icon menu |
161 | 161 | * @param string $identifier |
162 | 162 | * @param array $items icons |
163 | 163 | */ |
164 | - public function htmlLabeledIconMenu($identifier,$items=array()){ |
|
165 | - return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier,$items)); |
|
164 | + public function htmlLabeledIconMenu($identifier, $items=array()) { |
|
165 | + return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier, $items)); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
@@ -170,8 +170,8 @@ discard block |
||
170 | 170 | * @param string $value |
171 | 171 | * @param array $items |
172 | 172 | */ |
173 | - public function htmlDropdown($identifier, $value="", $items=array()){ |
|
174 | - return $this->addHtmlComponent(new HtmlDropdown($identifier,$value,$items)); |
|
173 | + public function htmlDropdown($identifier, $value="", $items=array()) { |
|
174 | + return $this->addHtmlComponent(new HtmlDropdown($identifier, $value, $items)); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
@@ -179,8 +179,8 @@ discard block |
||
179 | 179 | * @param string $identifier |
180 | 180 | * @param string $content |
181 | 181 | */ |
182 | - public function htmlMessage($identifier, $content=""){ |
|
183 | - return $this->addHtmlComponent(new HtmlMessage($identifier,$content)); |
|
182 | + public function htmlMessage($identifier, $content="") { |
|
183 | + return $this->addHtmlComponent(new HtmlMessage($identifier, $content)); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | /** |
@@ -188,8 +188,8 @@ discard block |
||
188 | 188 | * @param string $identifier |
189 | 189 | * @param string $content |
190 | 190 | */ |
191 | - public function htmlSegment($identifier, $content=""){ |
|
192 | - return $this->addHtmlComponent(new HtmlSegment($identifier,$content)); |
|
191 | + public function htmlSegment($identifier, $content="") { |
|
192 | + return $this->addHtmlComponent(new HtmlSegment($identifier, $content)); |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | /** |
@@ -197,16 +197,16 @@ discard block |
||
197 | 197 | * @param string $identifier |
198 | 198 | * @param array $items the segments |
199 | 199 | */ |
200 | - public function htmlSegmentGroups($identifier, $items=array()){ |
|
201 | - return $this->addHtmlComponent(new HtmlSegmentGroups($identifier,$items)); |
|
200 | + public function htmlSegmentGroups($identifier, $items=array()) { |
|
201 | + return $this->addHtmlComponent(new HtmlSegmentGroups($identifier, $items)); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | /** |
205 | 205 | * @param string $identifier |
206 | 206 | * @param mixed $content |
207 | 207 | */ |
208 | - public function htmlPopup(BaseHtml $container,$identifier,$content){ |
|
209 | - return $this->addHtmlComponent(new HtmlPopup($container,$identifier,$content)); |
|
208 | + public function htmlPopup(BaseHtml $container, $identifier, $content) { |
|
209 | + return $this->addHtmlComponent(new HtmlPopup($container, $identifier, $content)); |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | /** |
@@ -216,8 +216,8 @@ discard block |
||
216 | 216 | * @param boolean $createCols |
217 | 217 | * @param boolean $implicitRows |
218 | 218 | */ |
219 | - public function htmlGrid($identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){ |
|
220 | - return $this->addHtmlComponent(new HtmlGrid($identifier,$numRows,$numCols,$createCols,$implicitRows)); |
|
219 | + public function htmlGrid($identifier, $numRows=1, $numCols=NULL, $createCols=true, $implicitRows=false) { |
|
220 | + return $this->addHtmlComponent(new HtmlGrid($identifier, $numRows, $numCols, $createCols, $implicitRows)); |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
@@ -226,16 +226,16 @@ discard block |
||
226 | 226 | * @param mixed $content |
227 | 227 | * @param string $type |
228 | 228 | */ |
229 | - public function htmlHeader($identifier,$niveau=1,$content=NULL,$type="page"){ |
|
230 | - return $this->addHtmlComponent(new HtmlHeader($identifier,$niveau,$content,$type)); |
|
229 | + public function htmlHeader($identifier, $niveau=1, $content=NULL, $type="page") { |
|
230 | + return $this->addHtmlComponent(new HtmlHeader($identifier, $niveau, $content, $type)); |
|
231 | 231 | } |
232 | 232 | |
233 | - public function htmlInput($identifier,$type="text",$value="",$placeholder=""){ |
|
234 | - return $this->addHtmlComponent(new HtmlInput($identifier,$type,$value,$placeholder)); |
|
233 | + public function htmlInput($identifier, $type="text", $value="", $placeholder="") { |
|
234 | + return $this->addHtmlComponent(new HtmlInput($identifier, $type, $value, $placeholder)); |
|
235 | 235 | } |
236 | 236 | |
237 | - public function htmlList($identifier,$items=array()){ |
|
238 | - return $this->addHtmlComponent(new HtmlList($identifier,$items)); |
|
237 | + public function htmlList($identifier, $items=array()) { |
|
238 | + return $this->addHtmlComponent(new HtmlList($identifier, $items)); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | /** |
@@ -246,8 +246,8 @@ discard block |
||
246 | 246 | * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()} |
247 | 247 | * @return HtmlBreadcrumb |
248 | 248 | */ |
249 | - public function htmlBreadcrumb( $identifier,$items=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){ |
|
250 | - return $this->addHtmlComponent(new HtmlBreadcrumb($identifier,$items,$autoActive,$startIndex,$hrefFunction)); |
|
249 | + public function htmlBreadcrumb($identifier, $items=array(), $autoActive=true, $startIndex=0, $hrefFunction=NULL) { |
|
250 | + return $this->addHtmlComponent(new HtmlBreadcrumb($identifier, $items, $autoActive, $startIndex, $hrefFunction)); |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
@@ -264,8 +264,8 @@ discard block |
||
264 | 264 | * @param string $identifier |
265 | 265 | * @return HtmlAccordion |
266 | 266 | */ |
267 | - public function htmlAccordionMenu($identifier,$items=array()) { |
|
268 | - return $this->addHtmlComponent(new HtmlAccordionMenu($identifier,$items)); |
|
267 | + public function htmlAccordionMenu($identifier, $items=array()) { |
|
268 | + return $this->addHtmlComponent(new HtmlAccordionMenu($identifier, $items)); |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | /** |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | * @param string $identifier |
274 | 274 | * @param array $elements |
275 | 275 | */ |
276 | - public function htmlForm($identifier,$elements=array()) { |
|
277 | - return $this->addHtmlComponent(new HtmlForm($identifier,$elements)); |
|
276 | + public function htmlForm($identifier, $elements=array()) { |
|
277 | + return $this->addHtmlComponent(new HtmlForm($identifier, $elements)); |
|
278 | 278 | } |
279 | 279 | } |
280 | 280 | \ No newline at end of file |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | class HtmlInput extends HtmlSingleElement { |
9 | 9 | |
10 | - public function __construct($identifier,$type="text",$value=NULL,$placeholder=NULL) { |
|
10 | + public function __construct($identifier, $type="text", $value=NULL, $placeholder=NULL) { |
|
11 | 11 | parent::__construct($identifier, "input"); |
12 | 12 | $this->setProperty("name", $identifier); |
13 | 13 | $this->setValue($value); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | } |
17 | 17 | |
18 | 18 | public function setValue($value) { |
19 | - if(isset($value)) |
|
19 | + if (isset($value)) |
|
20 | 20 | $this->setProperty("value", $value); |
21 | 21 | return $this; |
22 | 22 | } |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | return $this->setProperty("type", $value); |
26 | 26 | } |
27 | 27 | |
28 | - public function setPlaceholder($value){ |
|
29 | - if(JString::isNotNull($value)) |
|
28 | + public function setPlaceholder($value) { |
|
29 | + if (JString::isNotNull($value)) |
|
30 | 30 | $this->setProperty("placeholder", $value); |
31 | 31 | return $this; |
32 | 32 | } |