@@ -96,10 +96,11 @@ |
||
96 | 96 | |
97 | 97 | protected function setDivider($divider,$index){ |
98 | 98 | if(isset($index)){ |
99 | - if(\is_array($this->_contentSeparator)===false) |
|
100 | - $this->_contentSeparator=array_fill (0, $this->count()-1,$this->_contentSeparator); |
|
99 | + if(\is_array($this->_contentSeparator)===false) { |
|
100 | + $this->_contentSeparator=array_fill (0, $this->count()-1,$this->_contentSeparator); |
|
101 | + } |
|
101 | 102 | $this->_contentSeparator[$index]=$divider; |
102 | - }else{ |
|
103 | + } else{ |
|
103 | 104 | $this->_contentSeparator=$divider; |
104 | 105 | } |
105 | 106 | return $this; |
@@ -50,8 +50,9 @@ discard block |
||
50 | 50 | |
51 | 51 | protected function _setDi($di) { |
52 | 52 | $this->_di=$di; |
53 | - if ($this->js!=null&&$di!=null) |
|
54 | - $this->js->setDi($di); |
|
53 | + if ($this->js!=null&&$di!=null) { |
|
54 | + $this->js->setDi($di); |
|
55 | + } |
|
55 | 56 | } |
56 | 57 | |
57 | 58 | /** |
@@ -1130,12 +1131,14 @@ discard block |
||
1130 | 1131 | $result[1]=$cdn; |
1131 | 1132 | break; |
1132 | 1133 | case "Ajax\lib\CDNCoreCss": |
1133 | - if($cdn->getFramework()==="Bootstrap") |
|
1134 | - $hasBootstrap=true; |
|
1135 | - elseif($cdn->getFramework()==="Semantic") |
|
1136 | - $hasSemantic=true; |
|
1137 | - if($hasSemantic || $hasBootstrap) |
|
1138 | - $result[2]=$cdn; |
|
1134 | + if($cdn->getFramework()==="Bootstrap") { |
|
1135 | + $hasBootstrap=true; |
|
1136 | + } elseif($cdn->getFramework()==="Semantic") { |
|
1137 | + $hasSemantic=true; |
|
1138 | + } |
|
1139 | + if($hasSemantic || $hasBootstrap) { |
|
1140 | + $result[2]=$cdn; |
|
1141 | + } |
|
1139 | 1142 | break; |
1140 | 1143 | } |
1141 | 1144 | } |
@@ -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 | } |
@@ -31,8 +31,9 @@ discard block |
||
31 | 31 | protected function createTitleElement(){ |
32 | 32 | $element=new HtmlSemDoubleElement("title-".$this->identifier,"div","title"); |
33 | 33 | $element->setContent(array(new HtmlIcon("", $this->_icon),$this->_title)); |
34 | - if($this->_active===true) |
|
35 | - $element->addToProperty("class", "active"); |
|
34 | + if($this->_active===true) { |
|
35 | + $element->addToProperty("class", "active"); |
|
36 | + } |
|
36 | 37 | return $element; |
37 | 38 | } |
38 | 39 | |
@@ -43,10 +44,11 @@ discard block |
||
43 | 44 | |
44 | 45 | public function setActive($value=true){ |
45 | 46 | $this->_active=$value; |
46 | - if($value===true) |
|
47 | - $this->addToPropertyCtrl("class", "active", array("active")); |
|
48 | - else |
|
49 | - $this->removePropertyValue("class", "active"); |
|
47 | + if($value===true) { |
|
48 | + $this->addToPropertyCtrl("class", "active", array("active")); |
|
49 | + } else { |
|
50 | + $this->removePropertyValue("class", "active"); |
|
51 | + } |
|
50 | 52 | return $this; |
51 | 53 | } |
52 | 54 | } |
53 | 55 | \ No newline at end of file |
@@ -8,8 +8,9 @@ discard block |
||
8 | 8 | public function __construct($identifier, $field,$label=NULL) { |
9 | 9 | parent::__construct($identifier, "div","ui field"); |
10 | 10 | $this->content=array(); |
11 | - if(isset($label)) |
|
12 | - $this->setLabel($label); |
|
11 | + if(isset($label)) { |
|
12 | + $this->setLabel($label); |
|
13 | + } |
|
13 | 14 | $this->setField($field); |
14 | 15 | } |
15 | 16 | |
@@ -28,8 +29,9 @@ discard block |
||
28 | 29 | } |
29 | 30 | |
30 | 31 | public function getLabel(){ |
31 | - if(\array_key_exists("label", $this->content)) |
|
32 | - return $this->content["label"]; |
|
32 | + if(\array_key_exists("label", $this->content)) { |
|
33 | + return $this->content["label"]; |
|
34 | + } |
|
33 | 35 | } |
34 | 36 | |
35 | 37 | public function getField(){ |
@@ -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 | } |
@@ -16,8 +16,9 @@ discard block |
||
16 | 16 | } |
17 | 17 | |
18 | 18 | public function setValue($value) { |
19 | - if(isset($value)) |
|
20 | - $this->setProperty("value", $value); |
|
19 | + if(isset($value)) { |
|
20 | + $this->setProperty("value", $value); |
|
21 | + } |
|
21 | 22 | return $this; |
22 | 23 | } |
23 | 24 | |
@@ -26,8 +27,9 @@ discard block |
||
26 | 27 | } |
27 | 28 | |
28 | 29 | public function setPlaceholder($value){ |
29 | - if(JString::isNotNull($value)) |
|
30 | - $this->setProperty("placeholder", $value); |
|
30 | + if(JString::isNotNull($value)) { |
|
31 | + $this->setProperty("placeholder", $value); |
|
32 | + } |
|
31 | 33 | return $this; |
32 | 34 | } |
33 | 35 | } |
34 | 36 | \ No newline at end of file |
@@ -11,18 +11,21 @@ |
||
11 | 11 | parent::__construct($identifier, "textarea"); |
12 | 12 | $this->setValue($value); |
13 | 13 | $this->setPlaceholder($placeholder); |
14 | - if(isset($rows)) |
|
15 | - $this->setRows($rows); |
|
14 | + if(isset($rows)) { |
|
15 | + $this->setRows($rows); |
|
16 | + } |
|
16 | 17 | } |
17 | 18 | public function setValue($value) { |
18 | - if(isset($value)) |
|
19 | - $this->setContent($value); |
|
19 | + if(isset($value)) { |
|
20 | + $this->setContent($value); |
|
21 | + } |
|
20 | 22 | return $this; |
21 | 23 | } |
22 | 24 | |
23 | 25 | public function setPlaceholder($value){ |
24 | - if(JString::isNotNull($value)) |
|
25 | - $this->setProperty("placeholder", $value); |
|
26 | + if(JString::isNotNull($value)) { |
|
27 | + $this->setProperty("placeholder", $value); |
|
28 | + } |
|
26 | 29 | return $this; |
27 | 30 | } |
28 | 31 |
@@ -8,8 +8,9 @@ |
||
8 | 8 | class HtmlFormInput extends HtmlFormField { |
9 | 9 | |
10 | 10 | public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) { |
11 | - if(!isset($placeholder)) |
|
12 | - $placeholder=$label; |
|
11 | + if(!isset($placeholder)) { |
|
12 | + $placeholder=$label; |
|
13 | + } |
|
13 | 14 | parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label); |
14 | 15 | } |
15 | 16 |