Completed
Push — master ( 9de830...b49918 )
by Jean-Christophe
03:44
created
Ajax/semantic/html/elements/HtmlIconGroups.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,21 +11,21 @@
 block discarded – undo
11 11
  */
12 12
 class HtmlIconGroups extends HtmlSemDoubleElement {
13 13
 
14
-	public function __construct($identifier,$size="") {
15
-		parent::__construct($identifier, "i","icons");
14
+	public function __construct($identifier, $size="") {
15
+		parent::__construct($identifier, "i", "icons");
16 16
 		$this->setSize($size);
17 17
 	}
18 18
 
19
-	public function add($icon,$size=""){
19
+	public function add($icon, $size="") {
20 20
 		$iconO=$icon;
21
-		if(\is_string($icon)){
21
+		if (\is_string($icon)) {
22 22
 			$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
23 23
 			$iconO->setSize($size);
24 24
 		}
25 25
 		$this->addContent($iconO);
26 26
 	}
27 27
 
28
-	public function getIcon($index){
28
+	public function getIcon($index) {
29 29
 		return $this->content[$index];
30 30
 	}
31 31
 }
32 32
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlSegment.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
  * @version 1.001
18 18
  */
19 19
 class HtmlSegment extends HtmlSemDoubleElement {
20
-	use AttachedTrait,TextAlignmentTrait;
20
+	use AttachedTrait, TextAlignmentTrait;
21 21
 	public function __construct($identifier, $content="") {
22
-		parent::__construct($identifier, "div","ui segment");
23
-		$this->_variations=\array_merge($this->_variations,[Variation::PADDED,Variation::COMPACT]);
24
-		$this->_states=\array_merge($this->_states,[State::LOADING]);
22
+		parent::__construct($identifier, "div", "ui segment");
23
+		$this->_variations=\array_merge($this->_variations, [Variation::PADDED, Variation::COMPACT]);
24
+		$this->_states=\array_merge($this->_states, [State::LOADING]);
25 25
 		$this->content=$content;
26 26
 	}
27 27
 
@@ -30,36 +30,36 @@  discard block
 block discarded – undo
30 30
 	 * @param string $type one of "raised","stacked","piled" default : ""
31 31
 	 * @return \Ajax\semantic\html\elements\HtmlSegment
32 32
 	 */
33
-	public function setType($type){
33
+	public function setType($type) {
34 34
 		return $this->addToPropertyCtrl("class", $type, SegmentType::getConstants());
35 35
 	}
36 36
 
37
-	public function setSens($sens="vertical"){
38
-		return $this->addToPropertyCtrl("class", $sens, array("vertical","horizontal"));
37
+	public function setSens($sens="vertical") {
38
+		return $this->addToPropertyCtrl("class", $sens, array("vertical", "horizontal"));
39 39
 	}
40 40
 
41 41
 
42
-	public function setEmphasis($value=Emphasis::SECONDARY){
42
+	public function setEmphasis($value=Emphasis::SECONDARY) {
43 43
 		return $this->addToPropertyCtrl("class", $value, Emphasis::getConstants());
44 44
 	}
45 45
 
46
-	public function setCircular(){
46
+	public function setCircular() {
47 47
 		return $this->addToProperty("class", "circular");
48 48
 	}
49 49
 
50
-	public function clear(){
50
+	public function clear() {
51 51
 		return $this->addToProperty("class", "clearing");
52 52
 	}
53 53
 
54
-	public function setFloating($value="left"){
55
-		return $this->addToPropertyCtrl("class", "floated ".$value,array("floated right","floated left"));
54
+	public function setFloating($value="left") {
55
+		return $this->addToPropertyCtrl("class", "floated ".$value, array("floated right", "floated left"));
56 56
 	}
57 57
 
58
-	public function setCompact(){
58
+	public function setCompact() {
59 59
 		return $this->addToProperty("class", "compact");
60 60
 	}
61 61
 
62
-	public function setBasic(){
62
+	public function setBasic() {
63 63
 		return $this->setProperty("class", "ui basic segment");
64 64
 	}
65 65
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlLabel.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,13 +10,16 @@
 block discarded – undo
10 10
 
11 11
 class HtmlLabel extends HtmlSemDoubleElement {
12 12
 	use LabeledIconTrait;
13
+
14
+	/**
15
+	 * @param string $identifier
16
+	 */
13 17
 	public function __construct($identifier,$caption="",$tagName="div") {
14 18
 		parent::__construct($identifier,$tagName,"ui label");
15 19
 		$this->content=$caption;
16 20
 	}
17 21
 
18 22
 	/**
19
-	 * @param string $side
20 23
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
21 24
 	 */
22 25
 	public function setPointing($value=Direction::NONE){
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 
11 11
 class HtmlLabel extends HtmlSemDoubleElement {
12 12
 	use LabeledIconTrait;
13
-	public function __construct($identifier,$caption="",$tagName="div") {
14
-		parent::__construct($identifier,$tagName,"ui label");
13
+	public function __construct($identifier, $caption="", $tagName="div") {
14
+		parent::__construct($identifier, $tagName, "ui label");
15 15
 		$this->content=$caption;
16 16
 	}
17 17
 
@@ -19,33 +19,33 @@  discard block
 block discarded – undo
19 19
 	 * @param string $side
20 20
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
21 21
 	 */
22
-	public function setPointing($value=Direction::NONE){
23
-		return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing"));
22
+	public function setPointing($value=Direction::NONE) {
23
+		return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
24 24
 	}
25 25
 
26 26
 	/**
27 27
 	 * @param string $side
28 28
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
29 29
 	 */
30
-	public function toCorner($side="left"){
31
-		return $this->addToPropertyCtrl("class", $side." corner",array("right corner","left corner"));
30
+	public function toCorner($side="left") {
31
+		return $this->addToPropertyCtrl("class", $side." corner", array("right corner", "left corner"));
32 32
 	}
33 33
 
34 34
 	/**
35 35
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
36 36
 	 */
37
-	public function asTag(){
37
+	public function asTag() {
38 38
 		return $this->addToProperty("class", "tag");
39 39
 	}
40 40
 
41 41
 	/**
42 42
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
43 43
 	 */
44
-	public function asLink(){
44
+	public function asLink() {
45 45
 		return $this->setTagName("a");
46 46
 	}
47 47
 
48
-	public function setBasic(){
48
+	public function setBasic() {
49 49
 		return $this->addToProperty("class", "basic");
50 50
 	}
51 51
 
@@ -56,17 +56,17 @@  discard block
 block discarded – undo
56 56
 	 * @param string $before
57 57
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
58 58
 	 */
59
-	public function addImage($src,$alt="",$before=true){
59
+	public function addImage($src, $alt="", $before=true) {
60 60
 		$this->addToProperty("class", "image");
61
-		return $this->addContent(new HtmlImg("image-".$this->identifier,$src,$alt),$before);
61
+		return $this->addContent(new HtmlImg("image-".$this->identifier, $src, $alt), $before);
62 62
 	}
63 63
 
64 64
 	/**
65 65
 	 * @param string $detail
66 66
 	 * @return \Ajax\common\html\HtmlDoubleElement
67 67
 	 */
68
-	public function addDetail($detail){
69
-		$div=new HtmlDoubleElement("detail-".$this->identifier,$this->tagName);
68
+	public function addDetail($detail) {
69
+		$div=new HtmlDoubleElement("detail-".$this->identifier, $this->tagName);
70 70
 		$div->setClass("detail");
71 71
 		$div->setContent($detail);
72 72
 		$this->addContent($div);
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlInput.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
 
8 8
 class HtmlInput extends HtmlSingleElement {
9 9
 
10
-	public function __construct($identifier,$type="text",$value="",$placeholder="") {
10
+	public function __construct($identifier, $type="text", $value="", $placeholder="") {
11 11
 		parent::__construct($identifier, "input");
12 12
 		$this->setProperty("name", $identifier);
13 13
 		$this->setProperty("value", $value);
14
-		if(JString::isNotNull($placeholder))
14
+		if (JString::isNotNull($placeholder))
15 15
 			$this->setProperty("placeholder", $placeholder);
16 16
 		$this->setProperty("type", $type);
17 17
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@
 block discarded – undo
11 11
 		parent::__construct($identifier, "input");
12 12
 		$this->setProperty("name", $identifier);
13 13
 		$this->setProperty("value", $value);
14
-		if(JString::isNotNull($placeholder))
15
-			$this->setProperty("placeholder", $placeholder);
14
+		if(JString::isNotNull($placeholder)) {
15
+					$this->setProperty("placeholder", $placeholder);
16
+		}
16 17
 		$this->setProperty("type", $type);
17 18
 	}
18 19
 
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/State.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class State extends BaseEnum {
8
-	const ACTIVE="active",DISABLED="disabled",ERROR="error",FOCUS="focus",LOADING="loading";
8
+	const ACTIVE="active", DISABLED="disabled", ERROR="error", FOCUS="focus", LOADING="loading";
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlListItem.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
 
8 8
 class HtmlListItem extends HtmlSemDoubleElement {
9 9
 	protected $image;
10
-	public function __construct($identifier,$content) {
10
+	public function __construct($identifier, $content) {
11 11
 		parent::__construct($identifier, "div", "item");
12 12
 		$this->_template='<%tagName% id="%identifier%" %properties%>%image%%content%</%tagName%>';
13 13
 		$this->content=$content;
14 14
 	}
15
-	public function addIcon($icon){
15
+	public function addIcon($icon) {
16 16
 		$content=$this->content;
17
-		$this->content=new HtmlSemDoubleElement("content-".$this->identifier,"div","content");
17
+		$this->content=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content");
18 18
 		$this->content->setContent($content);
19
-		$this->content->addContent(new HtmlIcon("icon".$this->identifier, $icon),true);
19
+		$this->content->addContent(new HtmlIcon("icon".$this->identifier, $icon), true);
20 20
 	}
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Variation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class Variation extends BaseEnum {
8
-	const ANIMATED="animated",AVATAR="avatar",COMPACT="compact",FLUID="fluid",INVERTED="inverted",PADDED="padded",TRANSPARENT="transparent";
8
+	const ANIMATED="animated", AVATAR="avatar", COMPACT="compact", FLUID="fluid", INVERTED="inverted", PADDED="padded", TRANSPARENT="transparent";
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlList.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,22 +5,22 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemCollection;
6 6
 use Ajax\semantic\html\content\HtmlListItem;
7 7
 
8
-class HtmlList extends HtmlSemCollection{
8
+class HtmlList extends HtmlSemCollection {
9 9
 
10 10
 
11
-	public function __construct( $identifier, $items=array()){
12
-		parent::__construct( $identifier, "div", "ui list");
11
+	public function __construct($identifier, $items=array()) {
12
+		parent::__construct($identifier, "div", "ui list");
13 13
 		$this->addItems($items);
14 14
 	}
15 15
 
16 16
 
17
-	protected function createItem($value){
17
+	protected function createItem($value) {
18 18
 		$count=$this->count();
19
-		if(\is_array($value)){
19
+		if (\is_array($value)) {
20 20
 			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value[0]);
21 21
 			$item->addIcon($value[1]);
22 22
 		}else
23
-			$item= new HtmlListItem("item-".$this->identifier."-".$count, $value);
23
+			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value);
24 24
 		return $item;
25 25
 	}
26 26
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@
 block discarded – undo
19 19
 		if(\is_array($value)){
20 20
 			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value[0]);
21 21
 			$item->addIcon($value[1]);
22
-		}else
23
-			$item= new HtmlListItem("item-".$this->identifier."-".$count, $value);
22
+		} else {
23
+					$item= new HtmlListItem("item-".$this->identifier."-".$count, $value);
24
+		}
24 25
 		return $item;
25 26
 	}
26 27
 
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlDropdown.php 2 patches
Braces   +28 added lines, -20 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		$itemO=$item;
35 35
 		if(\is_object($item)===false){
36 36
 			$itemO=new HtmlDropdownItem("dd-item-".$this->identifier."-".\sizeof($this->items),$item,$value,$image);
37
-		}elseif($itemO instanceof HtmlDropdownItem){
37
+		} elseif($itemO instanceof HtmlDropdownItem){
38 38
 			$this->addToProperty("class", "vertical");
39 39
 		}
40 40
 		$this->items[]=$itemO;
@@ -42,8 +42,9 @@  discard block
 block discarded – undo
42 42
 	}
43 43
 
44 44
 	public function addInput($name){
45
-		if(!isset($name))
46
-			$name="input-".$this->identifier;
45
+		if(!isset($name)) {
46
+					$name="input-".$this->identifier;
47
+		}
47 48
 		$this->setAction("activate");
48 49
 		$this->input=new HtmlInput($name,"hidden");
49 50
 	}
@@ -53,7 +54,7 @@  discard block
 block discarded – undo
53 54
 			foreach ($items as $k=>$v){
54 55
 				$this->addItem($v)->setData($k);
55 56
 			}
56
-		}else{
57
+		} else{
57 58
 			foreach ($items as $item){
58 59
 				$this->addItem($item);
59 60
 			}
@@ -67,7 +68,7 @@  discard block
 block discarded – undo
67 68
 		if($dropdown===false){
68 69
 			$this->_template=include dirname(__FILE__).'/../templates/tplDropdownMenu.php';
69 70
 			$dropdown="menu";
70
-		}else{
71
+		} else{
71 72
 			$dropdown="dropdown";
72 73
 			$this->mClass="menu";
73 74
 		}
@@ -83,18 +84,22 @@  discard block
 block discarded – undo
83 84
 	}
84 85
 
85 86
 	public function asButton($floating=false){
86
-		if($floating)
87
-			$this->addToProperty("class", "floating");
87
+		if($floating) {
88
+					$this->addToProperty("class", "floating");
89
+		}
88 90
 		return $this->addToProperty("class", "button");
89 91
 	}
90 92
 
91 93
 	public function asSelect($name=NULL,$multiple=false,$selection=true){
92
-		if(isset($name))
93
-			$this->addInput($name);
94
-		if($multiple)
95
-			$this->addToProperty("class", "multiple");
96
-		if ($selection)
97
-			$this->addToPropertyCtrl("class", "selection",array("selection"));
94
+		if(isset($name)) {
95
+					$this->addInput($name);
96
+		}
97
+		if($multiple) {
98
+					$this->addToProperty("class", "multiple");
99
+		}
100
+		if ($selection) {
101
+					$this->addToPropertyCtrl("class", "selection",array("selection"));
102
+		}
98 103
 		return $this;
99 104
 	}
100 105
 
@@ -104,8 +109,9 @@  discard block
 block discarded – undo
104 109
 	}
105 110
 
106 111
 	public function setSelect($name=NULL,$multiple=false){
107
-		if(!isset($name))
108
-			$name="select-".$this->identifier;
112
+		if(!isset($name)) {
113
+					$name="select-".$this->identifier;
114
+		}
109 115
 		$this->input=null;
110 116
 		if($multiple){
111 117
 			$this->setProperty("multiple", true);
@@ -136,12 +142,13 @@  discard block
 block discarded – undo
136 142
 	public function setValue($value){
137 143
 		if(isset($this->input)){
138 144
 			$this->input->setProperty("value", $value);
139
-		}else{
145
+		} else{
140 146
 			$this->setProperty("value", $value);
141 147
 		}
142 148
 		$textElement=$this->getElementById("text-".$this->identifier, $this->content);
143
-		if(isset($textElement))
144
-			$textElement->setContent($value);
149
+		if(isset($textElement)) {
150
+					$textElement->setContent($value);
151
+		}
145 152
 		return $this;
146 153
 	}
147 154
 
@@ -151,8 +158,9 @@  discard block
 block discarded – undo
151 158
 	 */
152 159
 	public function run(JsUtils $js) {
153 160
 		if($this->propertyContains("class", "simple")===false){
154
-			if(isset($this->_bsComponent)===false)
155
-				$this->_bsComponent=$js->semantic()->dropdown("#".$this->identifier,$this->params);
161
+			if(isset($this->_bsComponent)===false) {
162
+							$this->_bsComponent=$js->semantic()->dropdown("#".$this->identifier,$this->params);
163
+			}
156 164
 			$this->addEventsOnRun($js);
157 165
 			return $this->_bsComponent;
158 166
 		}
Please login to merge, or discard this patch.
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -17,31 +17,31 @@  discard block
 block discarded – undo
17 17
 	}
18 18
 	protected $mClass="menu";
19 19
 	protected $mTagName="div";
20
-	protected $items=array ();
21
-	protected $params=array("action"=>"nothing","on"=>"hover");
20
+	protected $items=array();
21
+	protected $params=array("action"=>"nothing", "on"=>"hover");
22 22
 	protected $input;
23 23
 
24 24
 	public function __construct($identifier, $value="", $items=array()) {
25 25
 		parent::__construct($identifier, "div");
26 26
 		$this->_template=include dirname(__FILE__).'/../templates/tplDropdown.php';
27 27
 		$this->setProperty("class", "ui dropdown");
28
-		$content=new HtmlSemDoubleElement("text-".$this->identifier,"div");
28
+		$content=new HtmlSemDoubleElement("text-".$this->identifier, "div");
29 29
 		$content->setClass("text");
30 30
 		$content->setContent($value);
31
-		$content->wrap("",new HtmlIcon("", "dropdown"));
31
+		$content->wrap("", new HtmlIcon("", "dropdown"));
32 32
 		$this->content=array($content);
33 33
 		$this->tagName="div";
34 34
 		$this->addItems($items);
35 35
 	}
36 36
 
37
-	public function addItem($item,$value=NULL,$image=NULL){
38
-		$itemO=$this->beforeAddItem($item,$value,$image);
37
+	public function addItem($item, $value=NULL, $image=NULL) {
38
+		$itemO=$this->beforeAddItem($item, $value, $image);
39 39
 		$this->items[]=$itemO;
40 40
 		return $itemO;
41 41
 	}
42 42
 
43
-	public function addIcon($icon,$before=true,$labeled=false){
44
-		$this->addIconP($icon,$before,$labeled);
43
+	public function addIcon($icon, $before=true, $labeled=false) {
44
+		$this->addIconP($icon, $before, $labeled);
45 45
 		return $this->getElementById("text-".$this->identifier, $this->content)->setWrapAfter("");
46 46
 	}
47 47
 	/**
@@ -50,20 +50,20 @@  discard block
 block discarded – undo
50 50
 	 * @param number $position
51 51
 	 * @return \Ajax\semantic\html\content\HtmlDropdownItem|unknown
52 52
 	 */
53
-	public function insertItem($item,$position=0){
53
+	public function insertItem($item, $position=0) {
54 54
 		$itemO=$this->beforeAddItem($item);
55
-		 $start = array_slice($this->items, 0, $position);
56
-		 $end = array_slice($this->items, $position);
57
-		 $start[] = $item;
55
+		 $start=array_slice($this->items, 0, $position);
56
+		 $end=array_slice($this->items, $position);
57
+		 $start[]=$item;
58 58
 		 $this->items=array_merge($start, $end);
59 59
 		 return $itemO;
60 60
 	}
61 61
 
62
-	protected function beforeAddItem($item,$value=NULL,$image=NULL){
62
+	protected function beforeAddItem($item, $value=NULL, $image=NULL) {
63 63
 		$itemO=$item;
64
-		if(!$item instanceof HtmlDropdownItem){
65
-			$itemO=new HtmlDropdownItem("dd-item-".$this->identifier."-".\sizeof($this->items),$item,$value,$image);
66
-		}elseif($itemO instanceof HtmlDropdownItem){
64
+		if (!$item instanceof HtmlDropdownItem) {
65
+			$itemO=new HtmlDropdownItem("dd-item-".$this->identifier."-".\sizeof($this->items), $item, $value, $image);
66
+		}elseif ($itemO instanceof HtmlDropdownItem) {
67 67
 			$this->addToProperty("class", "vertical");
68 68
 		}
69 69
 		return $itemO;
@@ -76,76 +76,76 @@  discard block
 block discarded – undo
76 76
 		$this->addItem($function($object));
77 77
 	}
78 78
 
79
-	public function addInput($name){
80
-		if(!isset($name))
79
+	public function addInput($name) {
80
+		if (!isset($name))
81 81
 			$name="input-".$this->identifier;
82 82
 		$this->setAction("activate");
83
-		$this->input=new HtmlInput($name,"hidden");
83
+		$this->input=new HtmlInput($name, "hidden");
84 84
 	}
85 85
 
86
-	public function addItems($items){
87
-		if(JArray::isAssociative($items)){
88
-			foreach ($items as $k=>$v){
86
+	public function addItems($items) {
87
+		if (JArray::isAssociative($items)) {
88
+			foreach ($items as $k=>$v) {
89 89
 				$this->addItem($v)->setData($k);
90 90
 			}
91
-		}else{
92
-			foreach ($items as $item){
91
+		}else {
92
+			foreach ($items as $item) {
93 93
 				$this->addItem($item);
94 94
 			}
95 95
 		}
96 96
 	}
97 97
 
98
-	public function count(){
98
+	public function count() {
99 99
 		return \sizeof($this->items);
100 100
 	}
101 101
 	/**
102 102
 	 * @param boolean $dropdown
103 103
 	 */
104
-	public function asDropdown($dropdown){
105
-		if($dropdown===false){
104
+	public function asDropdown($dropdown) {
105
+		if ($dropdown===false) {
106 106
 			$this->_template=include dirname(__FILE__).'/../templates/tplDropdownMenu.php';
107 107
 			$dropdown="menu";
108
-		}else{
108
+		}else {
109 109
 			$dropdown="dropdown";
110 110
 			$this->mClass="menu";
111 111
 		}
112
-		return $this->addToPropertyCtrl("class", $dropdown,array("menu","dropdown"));
112
+		return $this->addToPropertyCtrl("class", $dropdown, array("menu", "dropdown"));
113 113
 	}
114 114
 
115
-	public function setVertical(){
116
-		return $this->addToPropertyCtrl("class", "vertical",array("vertical"));
115
+	public function setVertical() {
116
+		return $this->addToPropertyCtrl("class", "vertical", array("vertical"));
117 117
 	}
118 118
 
119
-	public function setSimple(){
120
-		return $this->addToPropertyCtrl("class", "simple",array("simple"));
119
+	public function setSimple() {
120
+		return $this->addToPropertyCtrl("class", "simple", array("simple"));
121 121
 	}
122 122
 
123
-	public function asButton($floating=false){
124
-		if($floating)
123
+	public function asButton($floating=false) {
124
+		if ($floating)
125 125
 			$this->addToProperty("class", "floating");
126 126
 		return $this->addToProperty("class", "button");
127 127
 	}
128 128
 
129
-	public function asSelect($name=NULL,$multiple=false,$selection=true){
130
-		if(isset($name))
129
+	public function asSelect($name=NULL, $multiple=false, $selection=true) {
130
+		if (isset($name))
131 131
 			$this->addInput($name);
132
-		if($multiple)
132
+		if ($multiple)
133 133
 			$this->addToProperty("class", "multiple");
134 134
 		if ($selection)
135
-			$this->addToPropertyCtrl("class", "selection",array("selection"));
135
+			$this->addToPropertyCtrl("class", "selection", array("selection"));
136 136
 		return $this;
137 137
 	}
138 138
 
139
-	public function asSearch($name=NULL,$multiple=false,$selection=false){
140
-		$this->asSelect($name,$multiple,$selection);
139
+	public function asSearch($name=NULL, $multiple=false, $selection=false) {
140
+		$this->asSelect($name, $multiple, $selection);
141 141
 		return $this->addToProperty("class", "search");
142 142
 	}
143 143
 
144
-	public function setSelect($name=NULL,$multiple=false){
145
-		if(!isset($name))
144
+	public function setSelect($name=NULL, $multiple=false) {
145
+		if (!isset($name))
146 146
 			$name="select-".$this->identifier;
147 147
 		$this->input=null;
148
-		if($multiple){
148
+		if ($multiple) {
149 149
 			$this->setProperty("multiple", true);
150 150
 			$this->addToProperty("class", "multiple");
151 151
 		}
@@ -153,32 +153,32 @@  discard block
 block discarded – undo
153 153
 		$this->tagName="select";
154 154
 		$this->setProperty("name", $name);
155 155
 		$this->content=null;
156
-		foreach ($this->items as $item){
156
+		foreach ($this->items as $item) {
157 157
 			$item->asOption();
158 158
 		}
159 159
 		return $this;
160 160
 	}
161 161
 
162
-	public function asSubmenu($pointing=NULL){
162
+	public function asSubmenu($pointing=NULL) {
163 163
 		$this->setClass("ui dropdown link item");
164
-		if(isset($pointing)){
164
+		if (isset($pointing)) {
165 165
 			$this->setPointing($pointing);
166 166
 		}
167 167
 		return $this;
168 168
 	}
169 169
 
170
-	public function setPointing($value=Direction::NONE){
171
-		return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing"));
170
+	public function setPointing($value=Direction::NONE) {
171
+		return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
172 172
 	}
173 173
 
174
-	public function setValue($value){
175
-		if(isset($this->input)){
174
+	public function setValue($value) {
175
+		if (isset($this->input)) {
176 176
 			$this->input->setProperty("value", $value);
177
-		}else{
177
+		}else {
178 178
 			$this->setProperty("value", $value);
179 179
 		}
180 180
 		$textElement=$this->getElementById("text-".$this->identifier, $this->content);
181
-		if(isset($textElement))
181
+		if (isset($textElement))
182 182
 			$textElement->setContent($value);
183 183
 		return $this;
184 184
 	}
@@ -188,19 +188,19 @@  discard block
 block discarded – undo
188 188
 	 * @see BaseHtml::run()
189 189
 	 */
190 190
 	public function run(JsUtils $js) {
191
-		if($this->propertyContains("class", "simple")===false){
192
-			if(isset($this->_bsComponent)===false)
193
-				$this->_bsComponent=$js->semantic()->dropdown("#".$this->identifier,$this->params);
191
+		if ($this->propertyContains("class", "simple")===false) {
192
+			if (isset($this->_bsComponent)===false)
193
+				$this->_bsComponent=$js->semantic()->dropdown("#".$this->identifier, $this->params);
194 194
 			$this->addEventsOnRun($js);
195 195
 			return $this->_bsComponent;
196 196
 		}
197 197
 	}
198 198
 
199
-	public function setAction($action){
199
+	public function setAction($action) {
200 200
 		$this->params["action"]=$action;
201 201
 	}
202 202
 
203
-	public function setFullTextSearch($value){
203
+	public function setFullTextSearch($value) {
204 204
 		$this->params["fullTextSearch"]=$value;
205 205
 	}
206 206
 }
207 207
\ No newline at end of file
Please login to merge, or discard this patch.