@@ -89,8 +89,9 @@ discard block |
||
89 | 89 | public function asLink($href=NULL,$target=NULL) { |
90 | 90 | if (isset($href)) { |
91 | 91 | $_target=""; |
92 | - if(isset($target)) |
|
93 | - $_target="target='{$target}'"; |
|
92 | + if(isset($target)) { |
|
93 | + $_target="target='{$target}'"; |
|
94 | + } |
|
94 | 95 | $this->wrap("<a href='" . $href . "' {$_target}>", "</a>"); |
95 | 96 | } |
96 | 97 | return $this->addToProperty("class", "link"); |
@@ -107,8 +108,9 @@ discard block |
||
107 | 108 | */ |
108 | 109 | public function setBordered($inverted=false) { |
109 | 110 | $invertedStr=""; |
110 | - if ($inverted !== false) |
|
111 | - $invertedStr=" inverted"; |
|
111 | + if ($inverted !== false) { |
|
112 | + $invertedStr=" inverted"; |
|
113 | + } |
|
112 | 114 | return $this->addToProperty("class", "bordered" . $invertedStr); |
113 | 115 | } |
114 | 116 | |
@@ -121,12 +123,14 @@ discard block |
||
121 | 123 | } |
122 | 124 | |
123 | 125 | public function addLabel($label, $before=false, $icon=NULL) { |
124 | - if($before) |
|
125 | - $this->wrap($label); |
|
126 | - else |
|
127 | - $this->wrap("", $label); |
|
128 | - if(isset($icon)) |
|
129 | - $this->addToIcon($icon); |
|
126 | + if($before) { |
|
127 | + $this->wrap($label); |
|
128 | + } else { |
|
129 | + $this->wrap("", $label); |
|
130 | + } |
|
131 | + if(isset($icon)) { |
|
132 | + $this->addToIcon($icon); |
|
133 | + } |
|
130 | 134 | return $this; |
131 | 135 | } |
132 | 136 |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | public function setFocusable($value=true) { |
59 | - if ($value === true) |
|
60 | - $this->setProperty("tabindex", "0"); |
|
61 | - else { |
|
59 | + if ($value === true) { |
|
60 | + $this->setProperty("tabindex", "0"); |
|
61 | + } else { |
|
62 | 62 | $this->removeProperty("tabindex"); |
63 | 63 | } |
64 | 64 | return $this; |
@@ -184,8 +184,9 @@ discard block |
||
184 | 184 | * @return HtmlButton |
185 | 185 | */ |
186 | 186 | public static function social($identifier, $social, $value=NULL) { |
187 | - if ($value === NULL) |
|
188 | - $value=\ucfirst($social); |
|
187 | + if ($value === NULL) { |
|
188 | + $value=\ucfirst($social); |
|
189 | + } |
|
189 | 190 | $return=new HtmlButton($identifier, $value); |
190 | 191 | $return->addIcon($social); |
191 | 192 | return $return->addToPropertyCtrl("class", $social, Social::getConstants()); |
@@ -40,8 +40,9 @@ discard block |
||
40 | 40 | * @param string $popupEvent |
41 | 41 | */ |
42 | 42 | public function setPopupAttributes($variation=NULL, $popupEvent=NULL) { |
43 | - if (isset($this->_popup)) |
|
44 | - $this->_popup->setAttributes($variation, $popupEvent); |
|
43 | + if (isset($this->_popup)) { |
|
44 | + $this->_popup->setAttributes($variation, $popupEvent); |
|
45 | + } |
|
45 | 46 | } |
46 | 47 | |
47 | 48 | /** |
@@ -96,8 +97,9 @@ discard block |
||
96 | 97 | $labelO=$label; |
97 | 98 | if (\is_object($label) === false) { |
98 | 99 | $labelO=new HtmlLabel("label-" . $this->identifier, $label); |
99 | - if (isset($icon)) |
|
100 | - $labelO->addIcon($icon); |
|
100 | + if (isset($icon)) { |
|
101 | + $labelO->addIcon($icon); |
|
102 | + } |
|
101 | 103 | } else { |
102 | 104 | $labelO->addToPropertyCtrl("class", "label", array ("label" )); |
103 | 105 | } |
@@ -124,10 +126,12 @@ discard block |
||
124 | 126 | * @return HtmlSemDoubleElement |
125 | 127 | */ |
126 | 128 | public function asLink($href=NULL,$target=NULL) { |
127 | - if (isset($href)) |
|
128 | - $this->setProperty("href", $href); |
|
129 | - if(isset($target)) |
|
130 | - $this->setProperty("target", $target); |
|
129 | + if (isset($href)) { |
|
130 | + $this->setProperty("href", $href); |
|
131 | + } |
|
132 | + if(isset($target)) { |
|
133 | + $this->setProperty("target", $target); |
|
134 | + } |
|
131 | 135 | return $this->setTagName("a"); |
132 | 136 | } |
133 | 137 | |
@@ -138,8 +142,9 @@ discard block |
||
138 | 142 | */ |
139 | 143 | public function jsShowDimmer($show=true) { |
140 | 144 | $status="hide"; |
141 | - if ($show === true) |
|
142 | - $status="show"; |
|
145 | + if ($show === true) { |
|
146 | + $status="show"; |
|
147 | + } |
|
143 | 148 | return '$("#.' . $this->identifier . ').dimmer("' . $status . '");'; |
144 | 149 | } |
145 | 150 | |
@@ -148,8 +153,9 @@ discard block |
||
148 | 153 | * @see BaseHtml::compile() |
149 | 154 | */ |
150 | 155 | public function compile(JsUtils $js=NULL, &$view=NULL) { |
151 | - if (isset($this->_popup)) |
|
152 | - $this->_popup->compile($js); |
|
156 | + if (isset($this->_popup)) { |
|
157 | + $this->_popup->compile($js); |
|
158 | + } |
|
153 | 159 | return parent::compile($js, $view); |
154 | 160 | } |
155 | 161 |
@@ -37,8 +37,9 @@ discard block |
||
37 | 37 | |
38 | 38 | private function getPart($part, $index=NULL) { |
39 | 39 | if (\array_key_exists($part, $this->content)) { |
40 | - if (isset($index)) |
|
41 | - return $this->content[$part][$index]; |
|
40 | + if (isset($index)) { |
|
41 | + return $this->content[$part][$index]; |
|
42 | + } |
|
42 | 43 | return $this->content[$part]; |
43 | 44 | } |
44 | 45 | return NULL; |
@@ -140,8 +141,9 @@ discard block |
||
140 | 141 | $this->addToProperty("class", "link"); |
141 | 142 | if ($href !== "") { |
142 | 143 | $this->setProperty("href", $href); |
143 | - if (isset($target)) |
|
144 | - $this->setProperty("target", $target); |
|
144 | + if (isset($target)) { |
|
145 | + $this->setProperty("target", $target); |
|
146 | + } |
|
145 | 147 | } |
146 | 148 | return $this; |
147 | 149 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | foreach ($values as $v){ |
60 | 60 | $form->addField($v); |
61 | 61 | } |
62 | - }else{ |
|
62 | + } else{ |
|
63 | 63 | $separators[]=$count; |
64 | 64 | for($i=0;$i<$size;$i++){ |
65 | 65 | $this->_generateFields($form, $values, $headers, $separators[$i], $separators[$i+1], $wrappers); |
@@ -70,18 +70,20 @@ discard block |
||
70 | 70 | protected function _generateFields($form,$values,$headers,$sepFirst,$sepLast,$wrappers){ |
71 | 71 | $wrapper=null; |
72 | 72 | $fields=\array_slice($values, $sepFirst+1,$sepLast-$sepFirst); |
73 | - if(isset($headers[$sepFirst+1])) |
|
74 | - $form->addHeader($headers[$sepFirst+1],4,true); |
|
73 | + if(isset($headers[$sepFirst+1])) { |
|
74 | + $form->addHeader($headers[$sepFirst+1],4,true); |
|
75 | + } |
|
75 | 76 | if(isset($wrappers[$sepFirst+1])){ |
76 | 77 | $wrapper=$wrappers[$sepFirst+1]; |
77 | 78 | } |
78 | 79 | if(\sizeof($fields)===1){ |
79 | 80 | $added=$form->addField($fields[0]); |
80 | - }elseif(\sizeof($fields)>1){ |
|
81 | + } elseif(\sizeof($fields)>1){ |
|
81 | 82 | $added=$form->addFields($fields); |
82 | 83 | } |
83 | - if(isset($wrapper)) |
|
84 | - $added->wrap($wrapper[0],$wrapper[1]); |
|
84 | + if(isset($wrapper)) { |
|
85 | + $added->wrap($wrapper[0],$wrapper[1]); |
|
86 | + } |
|
85 | 87 | } |
86 | 88 | |
87 | 89 | /** |