@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @param string $attachTo |
43 | 43 | * @param string|array $params |
44 | - * @return $this |
|
44 | + * @return common\components\SimpleComponent |
|
45 | 45 | */ |
46 | 46 | public function generic($attachTo=NULL, $params=NULL) { |
47 | 47 | return $this->addComponent(new GenericComponent($this->js), $attachTo, $params); |
@@ -50,16 +50,22 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @param string $attachTo |
52 | 52 | * @param string|array $params |
53 | - * @return $this |
|
53 | + * @return common\components\SimpleComponent |
|
54 | 54 | */ |
55 | 55 | public function popup($attachTo=NULL, $params=NULL) { |
56 | 56 | return $this->addComponent(new Popup($this->js), $attachTo, $params); |
57 | 57 | } |
58 | 58 | |
59 | + /** |
|
60 | + * @param string $attachTo |
|
61 | + */ |
|
59 | 62 | public function dropdown($attachTo=NULL, $params=NULL) { |
60 | 63 | return $this->addComponent(new Dropdown($this->js), $attachTo, $params); |
61 | 64 | } |
62 | 65 | |
66 | + /** |
|
67 | + * @param string $attachTo |
|
68 | + */ |
|
63 | 69 | public function accordion($attachTo=NULL, $params=NULL) { |
64 | 70 | return $this->addComponent(new Accordion($this->js), $attachTo, $params); |
65 | 71 | } |
@@ -220,7 +226,7 @@ discard block |
||
220 | 226 | |
221 | 227 | /** |
222 | 228 | * @param string $identifier |
223 | - * @param number $niveau |
|
229 | + * @param integer $niveau |
|
224 | 230 | * @param mixed $content |
225 | 231 | * @param string $type |
226 | 232 | */ |
@@ -239,7 +245,6 @@ discard block |
||
239 | 245 | /** |
240 | 246 | * Return a new Seamntic Html Breadcrumb |
241 | 247 | * @param string $identifier |
242 | - * @param array $elements |
|
243 | 248 | * @param boolean $autoActive sets the last element's class to <b>active</b> if true. default : true |
244 | 249 | * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()} |
245 | 250 | * @return HtmlBreadcrumb |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * @param string $identifier |
81 | 81 | * @param string $icon |
82 | 82 | */ |
83 | - public function htmlIcon($identifier,$icon){ |
|
83 | + public function htmlIcon($identifier, $icon) { |
|
84 | 84 | return $this->addHtmlComponent(new HtmlIcon($identifier, $icon)); |
85 | 85 | } |
86 | 86 | |
@@ -89,14 +89,14 @@ discard block |
||
89 | 89 | * @param string $size |
90 | 90 | * @param array $icons |
91 | 91 | */ |
92 | - public function htmlIconGroups($identifier,$size="",$icons=array()){ |
|
93 | - $group=new HtmlIconGroups($identifier,$size); |
|
94 | - if(JArray::isAssociative($icons)){ |
|
95 | - foreach ($icons as $icon=>$size){ |
|
96 | - $group->add($icon,$size); |
|
92 | + public function htmlIconGroups($identifier, $size="", $icons=array()) { |
|
93 | + $group=new HtmlIconGroups($identifier, $size); |
|
94 | + if (JArray::isAssociative($icons)) { |
|
95 | + foreach ($icons as $icon=>$size) { |
|
96 | + $group->add($icon, $size); |
|
97 | 97 | } |
98 | - }else{ |
|
99 | - foreach ($icons as $icon){ |
|
98 | + }else { |
|
99 | + foreach ($icons as $icon) { |
|
100 | 100 | $group->add($icon); |
101 | 101 | } |
102 | 102 | } |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | * @param array $elements |
109 | 109 | * @param boolean $asIcons |
110 | 110 | */ |
111 | - public function htmlButtonGroups($identifier,$elements=array(),$asIcons=false){ |
|
112 | - return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements,$asIcons)); |
|
111 | + public function htmlButtonGroups($identifier, $elements=array(), $asIcons=false) { |
|
112 | + return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements, $asIcons)); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param string $identifier |
118 | 118 | * @param string $content |
119 | 119 | */ |
120 | - public function htmlContainer($identifier,$content=""){ |
|
120 | + public function htmlContainer($identifier, $content="") { |
|
121 | 121 | return $this->addHtmlComponent(new HtmlContainer($identifier, $content)); |
122 | 122 | } |
123 | 123 | |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | * @param string $identifier |
126 | 126 | * @param string $content |
127 | 127 | */ |
128 | - public function htmlDivider($identifier,$content="",$tagName="div"){ |
|
129 | - return $this->addHtmlComponent(new HtmlDivider($identifier, $content,$tagName)); |
|
128 | + public function htmlDivider($identifier, $content="", $tagName="div") { |
|
129 | + return $this->addHtmlComponent(new HtmlDivider($identifier, $content, $tagName)); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | * @param string $content |
135 | 135 | * @param string $tagName |
136 | 136 | */ |
137 | - public function htmlLabel($identifier,$content="",$tagName="div"){ |
|
138 | - return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$tagName)); |
|
137 | + public function htmlLabel($identifier, $content="", $tagName="div") { |
|
138 | + return $this->addHtmlComponent(new HtmlLabel($identifier, $content, $tagName)); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
@@ -143,24 +143,24 @@ discard block |
||
143 | 143 | * @param array $items |
144 | 144 | * @return Ajax\semantic\html\collections\HtmlMenu |
145 | 145 | */ |
146 | - public function htmlMenu($identifier,$items=array()){ |
|
147 | - return $this->addHtmlComponent(new HtmlMenu($identifier,$items)); |
|
146 | + public function htmlMenu($identifier, $items=array()) { |
|
147 | + return $this->addHtmlComponent(new HtmlMenu($identifier, $items)); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | /**Adds an icon menu |
151 | 151 | * @param string $identifier |
152 | 152 | * @param array $items icons |
153 | 153 | */ |
154 | - public function htmlIconMenu($identifier,$items=array()){ |
|
155 | - return $this->addHtmlComponent(new HtmlIconMenu($identifier,$items)); |
|
154 | + public function htmlIconMenu($identifier, $items=array()) { |
|
155 | + return $this->addHtmlComponent(new HtmlIconMenu($identifier, $items)); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /**Adds an labeled icon menu |
159 | 159 | * @param string $identifier |
160 | 160 | * @param array $items icons |
161 | 161 | */ |
162 | - public function htmlLabeledIconMenu($identifier,$items=array()){ |
|
163 | - return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier,$items)); |
|
162 | + public function htmlLabeledIconMenu($identifier, $items=array()) { |
|
163 | + return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier, $items)); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | /** |
@@ -168,8 +168,8 @@ discard block |
||
168 | 168 | * @param string $value |
169 | 169 | * @param array $items |
170 | 170 | */ |
171 | - public function htmlDropdown($identifier, $value="", $items=array()){ |
|
172 | - return $this->addHtmlComponent(new HtmlDropdown($identifier,$value,$items)); |
|
171 | + public function htmlDropdown($identifier, $value="", $items=array()) { |
|
172 | + return $this->addHtmlComponent(new HtmlDropdown($identifier, $value, $items)); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | /** |
@@ -177,8 +177,8 @@ discard block |
||
177 | 177 | * @param string $identifier |
178 | 178 | * @param string $content |
179 | 179 | */ |
180 | - public function htmlMessage($identifier, $content=""){ |
|
181 | - return $this->addHtmlComponent(new HtmlMessage($identifier,$content)); |
|
180 | + public function htmlMessage($identifier, $content="") { |
|
181 | + return $this->addHtmlComponent(new HtmlMessage($identifier, $content)); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
@@ -186,8 +186,8 @@ discard block |
||
186 | 186 | * @param string $identifier |
187 | 187 | * @param string $content |
188 | 188 | */ |
189 | - public function htmlSegment($identifier, $content=""){ |
|
190 | - return $this->addHtmlComponent(new HtmlSegment($identifier,$content)); |
|
189 | + public function htmlSegment($identifier, $content="") { |
|
190 | + return $this->addHtmlComponent(new HtmlSegment($identifier, $content)); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | /** |
@@ -195,16 +195,16 @@ discard block |
||
195 | 195 | * @param string $identifier |
196 | 196 | * @param array $items the segments |
197 | 197 | */ |
198 | - public function htmlSegmentGroups($identifier, $items=array()){ |
|
199 | - return $this->addHtmlComponent(new HtmlSegmentGroups($identifier,$items)); |
|
198 | + public function htmlSegmentGroups($identifier, $items=array()) { |
|
199 | + return $this->addHtmlComponent(new HtmlSegmentGroups($identifier, $items)); |
|
200 | 200 | } |
201 | 201 | |
202 | 202 | /** |
203 | 203 | * @param string $identifier |
204 | 204 | * @param mixed $content |
205 | 205 | */ |
206 | - public function htmlPopup(BaseHtml $container,$identifier,$content){ |
|
207 | - return $this->addHtmlComponent(new HtmlPopup($container,$identifier,$content)); |
|
206 | + public function htmlPopup(BaseHtml $container, $identifier, $content) { |
|
207 | + return $this->addHtmlComponent(new HtmlPopup($container, $identifier, $content)); |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | /** |
@@ -214,8 +214,8 @@ discard block |
||
214 | 214 | * @param boolean $createCols |
215 | 215 | * @param boolean $implicitRows |
216 | 216 | */ |
217 | - public function htmlGrid($identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){ |
|
218 | - return $this->addHtmlComponent(new HtmlGrid($identifier,$numRows,$numCols,$createCols,$implicitRows)); |
|
217 | + public function htmlGrid($identifier, $numRows=1, $numCols=NULL, $createCols=true, $implicitRows=false) { |
|
218 | + return $this->addHtmlComponent(new HtmlGrid($identifier, $numRows, $numCols, $createCols, $implicitRows)); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
@@ -224,16 +224,16 @@ discard block |
||
224 | 224 | * @param mixed $content |
225 | 225 | * @param string $type |
226 | 226 | */ |
227 | - public function htmlHeader($identifier,$niveau=1,$content=NULL,$type="page"){ |
|
228 | - return $this->addHtmlComponent(new HtmlHeader($identifier,$niveau,$content,$type)); |
|
227 | + public function htmlHeader($identifier, $niveau=1, $content=NULL, $type="page") { |
|
228 | + return $this->addHtmlComponent(new HtmlHeader($identifier, $niveau, $content, $type)); |
|
229 | 229 | } |
230 | 230 | |
231 | - public function htmlInput($identifier,$type="text",$value="",$placeholder=""){ |
|
232 | - return $this->addHtmlComponent(new HtmlInput($identifier,$type,$value,$placeholder)); |
|
231 | + public function htmlInput($identifier, $type="text", $value="", $placeholder="") { |
|
232 | + return $this->addHtmlComponent(new HtmlInput($identifier, $type, $value, $placeholder)); |
|
233 | 233 | } |
234 | 234 | |
235 | - public function htmlList($identifier,$items=array()){ |
|
236 | - return $this->addHtmlComponent(new HtmlList($identifier,$items)); |
|
235 | + public function htmlList($identifier, $items=array()) { |
|
236 | + return $this->addHtmlComponent(new HtmlList($identifier, $items)); |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | /** |
@@ -244,8 +244,8 @@ discard block |
||
244 | 244 | * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()} |
245 | 245 | * @return HtmlBreadcrumb |
246 | 246 | */ |
247 | - public function htmlBreadcrumb( $identifier,$items=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){ |
|
248 | - return $this->addHtmlComponent(new HtmlBreadcrumb($identifier,$items,$autoActive,$startIndex,$hrefFunction)); |
|
247 | + public function htmlBreadcrumb($identifier, $items=array(), $autoActive=true, $startIndex=0, $hrefFunction=NULL) { |
|
248 | + return $this->addHtmlComponent(new HtmlBreadcrumb($identifier, $items, $autoActive, $startIndex, $hrefFunction)); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | /** |
@@ -2,5 +2,5 @@ |
||
2 | 2 | namespace Ajax\semantic\html\base\constants; |
3 | 3 | use Ajax\common\BaseEnum; |
4 | 4 | abstract class Social extends BaseEnum { |
5 | - const FACEBOOK="facebook", TWITTER="twitter",GOOGLEPLUS="google plus",VK="vk",LINKEDIN="linkedin",INSTAGRAM="instagram",YOUTUBE="youtube"; |
|
5 | + const FACEBOOK="facebook", TWITTER="twitter", GOOGLEPLUS="google plus", VK="vk", LINKEDIN="linkedin", INSTAGRAM="instagram", YOUTUBE="youtube"; |
|
6 | 6 | } |
7 | 7 | \ No newline at end of file |
@@ -19,22 +19,22 @@ |
||
19 | 19 | $this->_title=$title; |
20 | 20 | } |
21 | 21 | |
22 | - public function setTitle($title){ |
|
22 | + public function setTitle($title) { |
|
23 | 23 | $this->_title=$title; |
24 | 24 | } |
25 | 25 | |
26 | - public function setIcon($icon){ |
|
26 | + public function setIcon($icon) { |
|
27 | 27 | $this->_icon=$icon; |
28 | 28 | } |
29 | 29 | |
30 | - protected function createTitleElement(){ |
|
31 | - $element=new HtmlSemDoubleElement("title-".$this->identifier,"div","title"); |
|
32 | - $element->setContent(array(new HtmlIcon("", $this->_icon),$this->_title)); |
|
30 | + protected function createTitleElement() { |
|
31 | + $element=new HtmlSemDoubleElement("title-".$this->identifier, "div", "title"); |
|
32 | + $element->setContent(array(new HtmlIcon("", $this->_icon), $this->_title)); |
|
33 | 33 | return $element; |
34 | 34 | } |
35 | 35 | |
36 | - public function compile(JsUtils $js=NULL, View $view=NULL){ |
|
36 | + public function compile(JsUtils $js=NULL, View $view=NULL) { |
|
37 | 37 | $this->titleElement=$this->createTitleElement(); |
38 | - return parent::compile($js,$view); |
|
38 | + return parent::compile($js, $view); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | \ 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"); |
@@ -94,14 +94,14 @@ discard block |
||
94 | 94 | * @param string $before |
95 | 95 | * @return \Ajax\semantic\html\elements\HtmlLabel |
96 | 96 | */ |
97 | - public function addLabel($caption,$before=false){ |
|
97 | + public function addLabel($caption, $before=false) { |
|
98 | 98 | $this->tagName="div"; |
99 | 99 | $this->addToProperty("class", "labeled"); |
100 | - $this->content=new HtmlButton("button-".$this->identifier,$this->content); |
|
100 | + $this->content=new HtmlButton("button-".$this->identifier, $this->content); |
|
101 | 101 | $this->content->setTagName("div"); |
102 | - $label=new HtmlLabel("label-".$this->identifier,$caption,"a"); |
|
102 | + $label=new HtmlLabel("label-".$this->identifier, $caption, "a"); |
|
103 | 103 | $label->setBasic(); |
104 | - $this->addContent($label,$before); |
|
104 | + $this->addContent($label, $before); |
|
105 | 105 | return $label; |
106 | 106 | } |
107 | 107 | /* |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function fromArray($array) { |
112 | 112 | $array=parent::fromArray($array); |
113 | - foreach ( $array as $key => $value ) { |
|
113 | + foreach ($array as $key => $value) { |
|
114 | 114 | $this->setProperty($key, $value); |
115 | 115 | } |
116 | 116 | return $array; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * show it is currently the active user selection |
121 | 121 | * @return \Ajax\semantic\html\elements\HtmlButton |
122 | 122 | */ |
123 | - public function setActive(){ |
|
123 | + public function setActive() { |
|
124 | 124 | return $this->addToProperty("class", "active"); |
125 | 125 | } |
126 | 126 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * hint towards a positive consequence |
129 | 129 | * @return \Ajax\semantic\html\elements\HtmlButton |
130 | 130 | */ |
131 | - public function setPositive(){ |
|
131 | + public function setPositive() { |
|
132 | 132 | return $this->addToProperty("class", "positive"); |
133 | 133 | } |
134 | 134 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | * hint towards a negative consequence |
137 | 137 | * @return \Ajax\semantic\html\elements\HtmlButton |
138 | 138 | */ |
139 | - public function setNegative(){ |
|
139 | + public function setNegative() { |
|
140 | 140 | return $this->addToProperty("class", "negative"); |
141 | 141 | } |
142 | 142 | |
@@ -144,14 +144,14 @@ discard block |
||
144 | 144 | * formatted to toggle on/off |
145 | 145 | * @return \Ajax\semantic\html\elements\HtmlButton |
146 | 146 | */ |
147 | - public function setToggle(){ |
|
147 | + public function setToggle() { |
|
148 | 148 | return $this->addToProperty("class", "toggle"); |
149 | 149 | } |
150 | 150 | |
151 | 151 | /** |
152 | 152 | * @return \Ajax\semantic\html\elements\HtmlButton |
153 | 153 | */ |
154 | - public function setCircular(){ |
|
154 | + public function setCircular() { |
|
155 | 155 | return $this->addToProperty("class", "circular"); |
156 | 156 | } |
157 | 157 | |
@@ -159,22 +159,22 @@ discard block |
||
159 | 159 | * button is less pronounced |
160 | 160 | * @return \Ajax\semantic\html\elements\HtmlButton |
161 | 161 | */ |
162 | - public function setBasic(){ |
|
162 | + public function setBasic() { |
|
163 | 163 | return $this->addToProperty("class", "basic"); |
164 | 164 | } |
165 | 165 | |
166 | - public function setEmphasis($value){ |
|
166 | + public function setEmphasis($value) { |
|
167 | 167 | return $this->addToPropertyCtrl("class", $value, Emphasis::getConstants()); |
168 | 168 | } |
169 | 169 | |
170 | - public function setLoading(){ |
|
170 | + public function setLoading() { |
|
171 | 171 | return $this->addToProperty("class", "loading"); |
172 | 172 | } |
173 | 173 | |
174 | - public static function getSocial($identifier,$social,$value=NULL){ |
|
175 | - if($value===NULL) |
|
174 | + public static function getSocial($identifier, $social, $value=NULL) { |
|
175 | + if ($value===NULL) |
|
176 | 176 | $value=\ucfirst($social); |
177 | - $return=new HtmlButton($identifier,$value); |
|
177 | + $return=new HtmlButton($identifier, $value); |
|
178 | 178 | $return->addIcon($social); |
179 | 179 | return $return->addToPropertyCtrl("class", $social, Social::getConstants()); |
180 | 180 | } |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | public function setFocusable($value=true){ |
56 | - if($value===true) |
|
57 | - $this->setProperty("tabindex", "0"); |
|
58 | - else{ |
|
56 | + if($value===true) { |
|
57 | + $this->setProperty("tabindex", "0"); |
|
58 | + } else{ |
|
59 | 59 | $this->removeProperty("tabindex"); |
60 | 60 | } |
61 | 61 | return $this; |
@@ -172,8 +172,9 @@ discard block |
||
172 | 172 | } |
173 | 173 | |
174 | 174 | public static function getSocial($identifier,$social,$value=NULL){ |
175 | - if($value===NULL) |
|
176 | - $value=\ucfirst($social); |
|
175 | + if($value===NULL) { |
|
176 | + $value=\ucfirst($social); |
|
177 | + } |
|
177 | 178 | $return=new HtmlButton($identifier,$value); |
178 | 179 | $return->addIcon($social); |
179 | 180 | return $return->addToPropertyCtrl("class", $social, Social::getConstants()); |
@@ -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,8 +34,8 @@ 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 | } |
@@ -34,8 +34,9 @@ |
||
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 | 40 | $this->addEventsOnRun($js); |
40 | 41 | return $this->_bsComponent; |
41 | 42 | } |