@@ -21,7 +21,7 @@ |
||
| 21 | 21 | if($class->getProperty($property)!==null){ |
| 22 | 22 | \call_user_func_array([$object,$name],[$value]); |
| 23 | 23 | } |
| 24 | - }catch(\Exception $e){ |
|
| 24 | + } catch(\Exception $e){ |
|
| 25 | 25 | //Nothing to do |
| 26 | 26 | } |
| 27 | 27 | } |
@@ -13,8 +13,9 @@ |
||
| 13 | 13 | public function __construct($identifier, $href="#", $content="Link",$target=NULL) { |
| 14 | 14 | parent::__construct($identifier, "a", ""); |
| 15 | 15 | $this->setHref($href); |
| 16 | - if(isset($target)) |
|
| 17 | - $this->setTarget($target); |
|
| 16 | + if(isset($target)) { |
|
| 17 | + $this->setTarget($target); |
|
| 18 | + } |
|
| 18 | 19 | $this->content=$content; |
| 19 | 20 | } |
| 20 | 21 | |
@@ -35,8 +35,9 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | public function setPopupAttributes($variation=NULL, $popupEvent=NULL) { |
| 38 | - if (isset($this->_popup)) |
|
| 39 | - $this->_popup->setAttributes($variation, $popupEvent); |
|
| 38 | + if (isset($this->_popup)) { |
|
| 39 | + $this->_popup->setAttributes($variation, $popupEvent); |
|
| 40 | + } |
|
| 40 | 41 | } |
| 41 | 42 | |
| 42 | 43 | public function addPopup($title="", $content="", $variation=NULL, $params=array()) { |
@@ -63,8 +64,9 @@ discard block |
||
| 63 | 64 | $labelO=$label; |
| 64 | 65 | if (\is_object($label) === false) { |
| 65 | 66 | $labelO=new HtmlLabel("label-" . $this->identifier, $label); |
| 66 | - if (isset($icon)) |
|
| 67 | - $labelO->addIcon($icon); |
|
| 67 | + if (isset($icon)) { |
|
| 68 | + $labelO->addIcon($icon); |
|
| 69 | + } |
|
| 68 | 70 | } else { |
| 69 | 71 | $labelO->addToPropertyCtrl("class", "label", array ("label" )); |
| 70 | 72 | } |
@@ -83,23 +85,27 @@ discard block |
||
| 83 | 85 | * @return \Ajax\semantic\html\base\HtmlSemDoubleElement |
| 84 | 86 | */ |
| 85 | 87 | public function asLink($href=NULL,$target=NULL) { |
| 86 | - if (isset($href)) |
|
| 87 | - $this->setProperty("href", $href); |
|
| 88 | - if(isset($target)) |
|
| 89 | - $this->setProperty("target", $target); |
|
| 88 | + if (isset($href)) { |
|
| 89 | + $this->setProperty("href", $href); |
|
| 90 | + } |
|
| 91 | + if(isset($target)) { |
|
| 92 | + $this->setProperty("target", $target); |
|
| 93 | + } |
|
| 90 | 94 | return $this->setTagName("a"); |
| 91 | 95 | } |
| 92 | 96 | |
| 93 | 97 | public function jsShowDimmer($show=true) { |
| 94 | 98 | $status="hide"; |
| 95 | - if ($show === true) |
|
| 96 | - $status="show"; |
|
| 99 | + if ($show === true) { |
|
| 100 | + $status="show"; |
|
| 101 | + } |
|
| 97 | 102 | return '$("#.' . $this->identifier . ').dimmer("' . $status . '");'; |
| 98 | 103 | } |
| 99 | 104 | |
| 100 | 105 | public function compile(JsUtils $js=NULL, &$view=NULL) { |
| 101 | - if (isset($this->_popup)) |
|
| 102 | - $this->_popup->compile($js); |
|
| 106 | + if (isset($this->_popup)) { |
|
| 107 | + $this->_popup->compile($js); |
|
| 108 | + } |
|
| 103 | 109 | return parent::compile($js, $view); |
| 104 | 110 | } |
| 105 | 111 | |
@@ -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,19 +70,21 @@ 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 | //TODO check why $fields is empty |
| 79 | 80 | if(\sizeof($fields)===1){ |
| 80 | 81 | $added=$form->addField($fields[0]); |
| 81 | - }elseif(\sizeof($fields)>1){ |
|
| 82 | + } elseif(\sizeof($fields)>1){ |
|
| 82 | 83 | $added=$form->addFields($fields); |
| 83 | 84 | } |
| 84 | - if(isset($wrapper)) |
|
| 85 | - $added->wrap($wrapper[0],$wrapper[1]); |
|
| 85 | + if(isset($wrapper)) { |
|
| 86 | + $added->wrap($wrapper[0],$wrapper[1]); |
|
| 87 | + } |
|
| 86 | 88 | } |
| 87 | 89 | |
| 88 | 90 | /** |