@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | protected $_popup=NULL; |
26 | 26 | protected $_dimmer=NULL; |
27 | 27 | protected $_toast=NULL; |
28 | - protected $_params=array (); |
|
28 | + protected $_params=array(); |
|
29 | 29 | |
30 | 30 | |
31 | 31 | public function __construct($identifier, $tagName="p", $baseClass="ui", $content=NULL) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * @return HtmlDimmer |
82 | 82 | */ |
83 | 83 | public function addDimmer($params=array(), $content=NULL) { |
84 | - $dimmer=new HtmlDimmer("dimmer-" . $this->identifier, $content); |
|
84 | + $dimmer=new HtmlDimmer("dimmer-".$this->identifier, $content); |
|
85 | 85 | $dimmer->setParams($params); |
86 | 86 | $dimmer->setContainer($this); |
87 | 87 | $this->addContent($dimmer); |
@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function addLabel($label, $before=false, $icon=NULL) { |
99 | 99 | $labelO=$label; |
100 | - if (\is_object($label) === false) { |
|
101 | - $labelO=new HtmlLabel("label-" . $this->identifier, $label); |
|
100 | + if (\is_object($label)===false) { |
|
101 | + $labelO=new HtmlLabel("label-".$this->identifier, $label); |
|
102 | 102 | if (isset($icon)) |
103 | 103 | $labelO->addIcon($icon); |
104 | 104 | } else { |
105 | - $labelO->addToPropertyCtrl("class", "label", array ("label" )); |
|
105 | + $labelO->addToPropertyCtrl("class", "label", array("label")); |
|
106 | 106 | } |
107 | 107 | $this->addContent($labelO, $before); |
108 | 108 | return $labelO; |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | * @param string $icon |
117 | 117 | * @return HtmlSemDoubleElement |
118 | 118 | */ |
119 | - public function attachLabel($label,$side=Side::TOP,$direction=Direction::NONE,$icon=NULL){ |
|
120 | - $label=$this->addLabel($label,true,$icon); |
|
121 | - $label->setAttached($side,$direction); |
|
119 | + public function attachLabel($label, $side=Side::TOP, $direction=Direction::NONE, $icon=NULL) { |
|
120 | + $label=$this->addLabel($label, true, $icon); |
|
121 | + $label->setAttached($side, $direction); |
|
122 | 122 | return $this; |
123 | 123 | } |
124 | 124 | |
@@ -126,10 +126,10 @@ discard block |
||
126 | 126 | * Transforms the element into a link |
127 | 127 | * @return HtmlSemDoubleElement |
128 | 128 | */ |
129 | - public function asLink($href=NULL,$target=NULL) { |
|
129 | + public function asLink($href=NULL, $target=NULL) { |
|
130 | 130 | if (isset($href)) |
131 | 131 | $this->setProperty("href", $href); |
132 | - if(isset($target)) |
|
132 | + if (isset($target)) |
|
133 | 133 | $this->setProperty("target", $target); |
134 | 134 | return $this->setTagName("a"); |
135 | 135 | } |
@@ -141,9 +141,9 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function jsShowDimmer($show=true) { |
143 | 143 | $status="hide"; |
144 | - if ($show === true) |
|
144 | + if ($show===true) |
|
145 | 145 | $status="show"; |
146 | - return '$("#.' . $this->identifier . ').dimmer("' . $status . '");'; |
|
146 | + return '$("#.'.$this->identifier.').dimmer("'.$status.'");'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * @see BaseHtml::compile() |
152 | 152 | */ |
153 | 153 | public function compile(JsUtils $js=NULL, &$view=NULL) { |
154 | - if (isset($this->_popup)){ |
|
154 | + if (isset($this->_popup)) { |
|
155 | 155 | $this->_popup->compile($js); |
156 | 156 | } |
157 | 157 | return parent::compile($js, $view); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * @see HtmlDoubleElement::run() |
163 | 163 | */ |
164 | 164 | public function run(JsUtils $js) { |
165 | - $this->_bsComponent=$js->semantic()->generic("#" . $this->identifier); |
|
165 | + $this->_bsComponent=$js->semantic()->generic("#".$this->identifier); |
|
166 | 166 | parent::run($js); |
167 | 167 | $this->addEventsOnRun($js); |
168 | 168 | if (isset($this->_popup)) { |
@@ -179,8 +179,8 @@ discard block |
||
179 | 179 | * @param boolean $ordered |
180 | 180 | * @return \Ajax\common\html\html5\HtmlList |
181 | 181 | */ |
182 | - public function addList($items,$ordered=false){ |
|
183 | - $list=new HtmlList("list-".$this->identifier,$items); |
|
182 | + public function addList($items, $ordered=false) { |
|
183 | + $list=new HtmlList("list-".$this->identifier, $items); |
|
184 | 184 | $list->setOrdered($ordered); |
185 | 185 | $list->setClass("ui list"); |
186 | 186 | $this->addContent($list); |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | * @param ?array $params |
192 | 192 | * @return \Ajax\semantic\components\Toast |
193 | 193 | */ |
194 | - public function asToast($params=NULL){ |
|
194 | + public function asToast($params=NULL) { |
|
195 | 195 | $this->_toast=new Toast(); |
196 | - if(isset($params)){ |
|
196 | + if (isset($params)) { |
|
197 | 197 | $this->_toast->setParams($params); |
198 | 198 | } |
199 | 199 | return $this->_toast; |