Completed
Push — master ( 13fe45...9e80e5 )
by Jean-Christophe
04:06
created
Ajax/bootstrap/html/HtmlNavbar.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	public function __construct($identifier, $brand="Brand", $brandHref="#") {
33 33
 		parent::__construct($identifier);
34 34
 		$this->_template=include 'templates/tplNavbar.php';
35
-		$this->navZones=array ();
35
+		$this->navZones=array();
36 36
 		$this->class="navbar-default";
37 37
 		$this->brand=$brand;
38 38
 		$this->brandHref=$brandHref;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	}
61 61
 
62 62
 	public function setBrandImage($imageSrc) {
63
-		$this->brandImage=PhalconUtils::image(array (
63
+		$this->brandImage=PhalconUtils::image(array(
64 64
 				$imageSrc,
65 65
 				"alt" => $this->brand
66 66
 		));
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 	public function setNavZones($navZones) {
109 109
 		if (\is_array($navZones)) {
110
-			foreach ( $navZones as $zoneType => $zoneArray ) {
110
+			foreach ($navZones as $zoneType => $zoneArray) {
111 111
 				if (is_string($zoneType)) {
112 112
 					$zone=$this->addZone($zoneType);
113 113
 					$zone->fromArray($zoneArray);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 			if ($index<$nb)
148 148
 				$zone=$this->navZones [$index];
149 149
 		} else {
150
-			for($i=0; $i<$nb; $i++) {
150
+			for ($i=0; $i<$nb; $i++) {
151 151
 				if ($this->navZones [$i]->getIdentifier()===$index) {
152 152
 					$zone=$this->navZones [$i];
153 153
 					break;
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	}
159 159
 
160 160
 	public function run(JsUtils $js) {
161
-		foreach ( $this->navZones as $zone ) {
161
+		foreach ($this->navZones as $zone) {
162 162
 			$zone->run($js);
163 163
 		}
164 164
 		if ($this->hasScrollspy) {
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
 	}
181 181
 
182 182
 	public function setFluid($fluid) {
183
-		if($fluid===true){
183
+		if ($fluid===true) {
184 184
 			$this->fluid="container-fluid";
185
-		}else{
185
+		} else {
186 186
 			$this->fluid="container";
187 187
 		}
188 188
 		return $this;
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlModal.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 class HtmlModal extends BaseHtml {
15 15
 	protected $title="Titre de ma boîte";
16 16
 	protected $content="";
17
-	protected $buttons=array ();
17
+	protected $buttons=array();
18 18
 	protected $showOnStartup=false;
19 19
 	protected $draggable=false;
20 20
 	protected $validCondition=NULL;
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 	public function __construct($identifier, $title="", $content="", $buttonCaptions=array()) {
28 28
 		parent::__construct($identifier);
29 29
 		$this->_template=include 'templates/tplModal.php';
30
-		$this->buttons=array ();
30
+		$this->buttons=array();
31 31
 		$this->title=$title;
32 32
 		$this->content=$content;
33
-		foreach ( $buttonCaptions as $button ) {
33
+		foreach ($buttonCaptions as $button) {
34 34
 			$this->addButton($button);
35 35
 		}
36 36
 	}
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 * @param string $value
66 66
 	 * @return HtmlButton
67 67
 	 */
68
-	public function addOkayButton($value="Okay",$jsCode="") {
68
+	public function addOkayButton($value="Okay", $jsCode="") {
69 69
 		$btn=$this->addButton($value, "btn-primary");
70 70
 		$btn->onClick("if(".$this->getValidCondition()."){ ".$jsCode."$('#".$this->identifier."').modal('hide');}");
71 71
 		return $btn;
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
 	 * @param string $viewName
115 115
 	 * @param $params The parameters to pass to the view
116 116
 	 */
117
-	public function renderView(JsUtils $js,$initialController,$viewName, $params=array()) {
118
-		$this->content=$js->renderContent($initialController, $viewName,$params);
117
+	public function renderView(JsUtils $js, $initialController, $viewName, $params=array()) {
118
+		$this->content=$js->renderContent($initialController, $viewName, $params);
119 119
 	}
120 120
 
121 121
 	/**
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 	 * @param string $actionName the action name
127 127
 	 * @param array $params
128 128
 	 */
129
-	public function forward(JsUtils $js,$initialControllerInstance,$controllerName,$actionName,$params=NULL){
130
-		$this->content=$js->forward($initialControllerInstance, $controllerName, $actionName,$params);
129
+	public function forward(JsUtils $js, $initialControllerInstance, $controllerName, $actionName, $params=NULL) {
130
+		$this->content=$js->forward($initialControllerInstance, $controllerName, $actionName, $params);
131 131
 	}
132 132
 
133 133
 	/*
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 	 * @see BaseHtml::run()
136 136
 	 */
137 137
 	public function run(JsUtils $js) {
138
-		if($this->content instanceof BaseHtml){
138
+		if ($this->content instanceof BaseHtml) {
139 139
 			$this->content->run($js);
140 140
 		}
141
-		$this->_bsComponent=$js->bootstrap()->modal("#".$this->identifier, array (
141
+		$this->_bsComponent=$js->bootstrap()->modal("#".$this->identifier, array(
142 142
 				"show" => $this->showOnStartup
143 143
 		));
144 144
 		if ($this->draggable)
Please login to merge, or discard this patch.
Ajax/bootstrap/html/content/HtmlNavzone.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 		parent::__construct($identifier);
28 28
 		$this->tagName="ul";
29 29
 		$this->_template='<%tagName% id="%identifier%" class="nav navbar-nav %class%">%elements%</%tagName%>';
30
-		$this->elements=array ();
30
+		$this->elements=array();
31 31
 	}
32 32
 
33 33
 	public function setClass($value) {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	}
40 40
 
41 41
 	public function addElement($element) {
42
-		if($element instanceof HtmlLink){
42
+		if ($element instanceof HtmlLink) {
43 43
 			$this->addLink($element);
44 44
 		} else if (is_object($element)) {
45 45
 			$this->elements []=$element;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 	public function addElements($elements) {
61 61
 		if (\is_array($elements)) {
62
-			foreach ( $elements as $key => $element ) {
62
+			foreach ($elements as $key => $element) {
63 63
 				$iid=$this->getElementsCount()+1;
64 64
 				if ($element instanceof HtmlDropdownItem)
65 65
 					$this->elements []=$element;
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 	public function addLink($caption, $href="#") {
88 88
 		$iid=$this->getElementsCount()+1;
89 89
 		$li=new HtmlBsDoubleElement($this->identifier."-li-".$iid, "li");
90
-		if($caption instanceof HtmlLink){
90
+		if ($caption instanceof HtmlLink) {
91 91
 			$link=$caption;
92
-		}else{
92
+		} else {
93 93
 			$link=new HtmlLink($this->identifier."-link-".$iid, $href, $caption);
94 94
 		}
95 95
 		$li->setContent($link);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	}
123 123
 
124 124
 	public function run(JsUtils $js) {
125
-		foreach ( $this->elements as $element ) {
125
+		foreach ($this->elements as $element) {
126 126
 			$element->run($js);
127 127
 		}
128 128
 	}
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @param int $index
144 144
 	 * @return BaseHtml
145 145
 	 */
146
-	public function getElement($index){
146
+	public function getElement($index) {
147 147
 		return $this->elements[$index];
148 148
 	}
149 149
 }
150 150
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/bootstrap/html/base/HtmlNavElement.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 	protected $attr;
20 20
 
21 21
 
22
-	public function __construct($identifier,$tagName){
23
-		parent::__construct($identifier,$tagName);
22
+	public function __construct($identifier, $tagName) {
23
+		parent::__construct($identifier, $tagName);
24 24
 		$this->root="";
25 25
 		$this->attr="data-ajax";
26 26
 	}
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
 	 * @param string $targetSelector the target of the get
32 32
 	 * @return HtmlNavElement
33 33
 	 */
34
-	public function autoGetOnClick($targetSelector){
35
-		return $this->getOnClick($this->root, $targetSelector,array("attr"=>$this->attr));
34
+	public function autoGetOnClick($targetSelector) {
35
+		return $this->getOnClick($this->root, $targetSelector, array("attr"=>$this->attr));
36 36
 	}
37 37
 
38
-	public function contentAsString(){
38
+	public function contentAsString() {
39 39
 		return implode("", $this->content);
40 40
 	}
41 41
 
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
 	 * Generate the jquery script to set the elements to the HtmlNavElement
44 44
 	 * @param JsUtils $jsUtils
45 45
 	 */
46
-	public function jsSetContent(JsUtils $jsUtils){
47
-		$jsUtils->html("#".$this->identifier,str_replace("\"","'", $this->contentAsString()),true);
46
+	public function jsSetContent(JsUtils $jsUtils) {
47
+		$jsUtils->html("#".$this->identifier, str_replace("\"", "'", $this->contentAsString()), true);
48 48
 	}
49 49
 
50 50
 	public function getRoot() {
51 51
 		return $this->root;
52 52
 	}
53 53
 	public function setRoot($root) {
54
-		$this->root = $root;
54
+		$this->root=$root;
55 55
 		return $this;
56 56
 	}
57 57
 	public function getAttr() {
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
 	 * @return HtmlNavElement
65 65
 	 */
66 66
 	public function setAttr($attr) {
67
-		$this->attr = $attr;
67
+		$this->attr=$attr;
68 68
 		return $this;
69 69
 	}
70 70
 
71 71
 	public function __call($method, $args) {
72
-		if(isset($this->$method) && is_callable($this->$method)) {
72
+		if (isset($this->$method) && is_callable($this->$method)) {
73 73
 			return call_user_func_array(
74 74
 					$this->$method,
75 75
 					$args
@@ -77,6 +77,6 @@  discard block
 block discarded – undo
77 77
 		}
78 78
 	}
79 79
 
80
-	abstract public function fromDispatcher(JsUtils $js,$dispatcher,$startIndex=0);
80
+	abstract public function fromDispatcher(JsUtils $js, $dispatcher, $startIndex=0);
81 81
 
82 82
 }
83 83
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/php/yii/JsUtils.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@  discard block
 block discarded – undo
4 4
 
5 5
 use yii\helpers\Url;
6 6
 
7
-class JsUtils extends \Ajax\JsUtils{
8
-	public function getUrl($url){
9
-		if($url==="")
7
+class JsUtils extends \Ajax\JsUtils {
8
+	public function getUrl($url) {
9
+		if ($url==="")
10 10
 			$url="/";
11 11
 		return Url::toRoute($url);
12 12
 	}
13 13
 
14
-	public function addViewElement($identifier,$content,&$view){
14
+	public function addViewElement($identifier, $content, &$view) {
15 15
 		$params=$view->params;
16 16
 		if (\array_key_exists("q", $params)===false) {
17 17
 			$view->params["q"]=array();
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 		$view->params["q"][$identifier]=$content;
20 20
 	}
21 21
 
22
-	public function createScriptVariable(&$view,$view_var, $output){
22
+	public function createScriptVariable(&$view, $view_var, $output) {
23 23
 		$view->params[$view_var]=$output;
24 24
 	}
25 25
 
26
-	public function forward($initialControllerInstance,$controllerName,$actionName,$params=array()){
26
+	public function forward($initialControllerInstance, $controllerName, $actionName, $params=array()) {
27 27
 		\ob_start();
28 28
 		$ctrInfo=\yii::$app->createController($controllerName."/".$actionName);
29 29
 		$ctrInfo[0]->{$ctrInfo[1]}($params);
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 		return $result;
33 33
 	}
34 34
 
35
-	public function renderContent($initialControllerInstance,$viewName, $params=NULL) {
36
-		return \yii::$app->view->render($viewName,$params);
35
+	public function renderContent($initialControllerInstance, $viewName, $params=NULL) {
36
+		return \yii::$app->view->render($viewName, $params);
37 37
 	}
38 38
 
39
-	public function fromDispatcher($dispatcher){
39
+	public function fromDispatcher($dispatcher) {
40 40
 		$uri=new \Ajax\php\yii\URI();
41 41
 		return $uri->segment_array();
42 42
 	}
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticHtmlElementsTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 	 * @param string $tagName
159 159
 	 * @return HtmlLabel
160 160
 	 */
161
-	public function htmlLabel($identifier, $content="", $icon=NULL,$tagName="div") {
162
-		return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$icon, $tagName));
161
+	public function htmlLabel($identifier, $content="", $icon=NULL, $tagName="div") {
162
+		return $this->addHtmlComponent(new HtmlLabel($identifier, $content, $icon, $tagName));
163 163
 	}
164 164
 
165 165
 	/**
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
 	 * @param array $attributes
169 169
 	 * @return HtmlLabelGroups
170 170
 	 */
171
-	public function htmlLabelGroups($identifier,$labels=array(),$attributes=array()){
172
-		return $this->addHtmlComponent(new HtmlLabelGroups($identifier,$labels,$attributes));
171
+	public function htmlLabelGroups($identifier, $labels=array(), $attributes=array()) {
172
+		return $this->addHtmlComponent(new HtmlLabelGroups($identifier, $labels, $attributes));
173 173
 	}
174 174
 
175 175
 	/**
Please login to merge, or discard this patch.
Ajax/semantic/html/views/HtmlCard.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -17,19 +17,19 @@  discard block
 block discarded – undo
17 17
 class HtmlCard extends HtmlSemDoubleElement {
18 18
 
19 19
 	public function __construct($identifier) {
20
-		parent::__construct($identifier, "div", "ui card", array ());
20
+		parent::__construct($identifier, "div", "ui card", array());
21 21
 	}
22 22
 
23 23
 	private function createContent($content, $baseClass="content") {
24 24
 		$count=\sizeof($this->content);
25
-		$result=new HtmlCardContent("content-" . $count . "-" . $this->identifier, $content);
25
+		$result=new HtmlCardContent("content-".$count."-".$this->identifier, $content);
26 26
 		$result->setClass($baseClass);
27 27
 		return $result;
28 28
 	}
29 29
 
30 30
 	private function addElementInContent($key, $element) {
31
-		if (\array_key_exists($key, $this->content) === false) {
32
-			$this->content[$key]=array ();
31
+		if (\array_key_exists($key, $this->content)===false) {
32
+			$this->content[$key]=array();
33 33
 		}
34 34
 		$this->content[$key][]=$element;
35 35
 		return $element;
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 
47 47
 	public function addHeader($header, $niveau=4, $type="page") {
48 48
 		if (!$header instanceof HtmlHeader) {
49
-			$header=new HtmlHeader("header-" . $this->identifier, $niveau, $header, $type);
49
+			$header=new HtmlHeader("header-".$this->identifier, $niveau, $header, $type);
50 50
 		}
51 51
 		$this->content["header"]=$this->createContent($header);
52 52
 	}
53 53
 
54 54
 	public function addImage($image, $title="") {
55 55
 		if (!$image instanceof HtmlImage) {
56
-			$image=new HtmlImage("image-" . $this->identifier, $image, $title);
56
+			$image=new HtmlImage("image-".$this->identifier, $image, $title);
57 57
 		}
58 58
 		$image->setClass("image");
59 59
 		return $this->addElementInContent("content", $image);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	public function addReveal($visibleContent, $hiddenContent=NULL, $type=RevealType::FADE, $attributeType=NULL) {
63 63
 		$reveal=$visibleContent;
64 64
 		if (!$visibleContent instanceof HtmlReveal) {
65
-			$reveal=new HtmlReveal("reveral-" . $this->identifier, $visibleContent, $hiddenContent, $type, $attributeType);
65
+			$reveal=new HtmlReveal("reveral-".$this->identifier, $visibleContent, $hiddenContent, $type, $attributeType);
66 66
 		}
67 67
 		return $this->addElementInContent("content", $reveal);
68 68
 	}
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 	 * @param boolean $asIcons
92 92
 	 * @return \Ajax\semantic\html\elements\HtmlButtonGroups
93 93
 	 */
94
-	public function addButtons($elements=array(), $asIcons=false){
95
-		$buttons=new HtmlButtonGroups("buttons-".$this->identifier,$elements,$asIcons);
94
+	public function addButtons($elements=array(), $asIcons=false) {
95
+		$buttons=new HtmlButtonGroups("buttons-".$this->identifier, $elements, $asIcons);
96 96
 		$this->addElementInContent("content", $buttons);
97 97
 		return $buttons;
98 98
 	}
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
 
102 102
 	public function addCardHeaderContent($header, $metas=array(), $description=NULL) {
103 103
 		$count=\sizeof($this->content);
104
-		return $this->addElementInContent("content", new HtmlCardHeaderContent("content-" . $count . "-" . $this->identifier, $header, $metas, $description));
104
+		return $this->addElementInContent("content", new HtmlCardHeaderContent("content-".$count."-".$this->identifier, $header, $metas, $description));
105 105
 	}
106 106
 
107 107
 	public function addCardContent($content=array()) {
108 108
 		$count=\sizeof($this->content);
109
-		return $this->addElementInContent("content", new HtmlCardContent("content-" . $count . "-" . $this->identifier, $content));
109
+		return $this->addElementInContent("content", new HtmlCardContent("content-".$count."-".$this->identifier, $content));
110 110
 	}
111 111
 
112 112
 	public function getCardContent($index=NULL) {
@@ -132,13 +132,13 @@  discard block
 block discarded – undo
132 132
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
133 133
 	 */
134 134
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
135
-		$this->content=JArray::sortAssociative($this->content, [ "header","image","content","extra-content" ]);
135
+		$this->content=JArray::sortAssociative($this->content, ["header", "image", "content", "extra-content"]);
136 136
 		return parent::compile($js, $view);
137 137
 	}
138 138
 
139 139
 	public function asLink($href="") {
140 140
 		$this->addToProperty("class", "link");
141
-		if ($href !== "") {
141
+		if ($href!=="") {
142 142
 			$this->setProperty("href", $href);
143 143
 		}
144 144
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormFields.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		}
36 36
 		if (isset($label))
37 37
 			$this->setLabel($label);
38
-		foreach ( $fields as $field ) {
38
+		foreach ($fields as $field) {
39 39
 			$this->addItem($field);
40 40
 		}
41 41
 		return $this;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 	public function addItem($item) {
59 59
 		$item=parent::addItem($item);
60
-		if($item instanceof HtmlFormField)
60
+		if ($item instanceof HtmlFormField)
61 61
 			$item->setContainer($this);
62 62
 		return $item;
63 63
 	}
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 
99 99
 
100 100
 	public static function radios($name, $items=array(), $label=NULL, $value=null, $type=NULL) {
101
-		$fields=array ();
101
+		$fields=array();
102 102
 		$i=0;
103
-		foreach ( $items as $val => $caption ) {
103
+		foreach ($items as $val => $caption) {
104 104
 			$itemO=new HtmlFormRadio($name."-".$i++, $name, $caption, $val, $type);
105 105
 			if ($val===$value) {
106 106
 				$itemO->getField()->setProperty("checked", "");
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
 	}
115 115
 
116 116
 	public static function checkeds($name, $items=array(), $label=NULL, $values=array(), $type=NULL) {
117
-		$fields=array ();
117
+		$fields=array();
118 118
 		$i=0;
119
-		foreach ( $items as $val => $caption ) {
119
+		foreach ($items as $val => $caption) {
120 120
 			$itemO=new HtmlFormCheckbox($name."-".$i++, $name, $caption, $val, $type);
121 121
 			if (\array_search($val, $values)!==false) {
122 122
 				//TODO check getField
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/traits/FieldTrait.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 	abstract public function addToProperty($name, $value, $separator=" ");
18 18
 	abstract public function addLabel($caption, $style="label-default", $leftSeparator="&nbsp;");
19
-	abstract public function addContent($content,$before=false);
19
+	abstract public function addContent($content, $before=false);
20 20
 	abstract public function getField();
21 21
 	abstract public function getDataField();
22 22
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	}
26 26
 
27 27
 	public function addLoading() {
28
-		if ($this->_hasIcon === false) {
28
+		if ($this->_hasIcon===false) {
29 29
 			throw new \Exception("Input must have an icon for showing a loader, use addIcon before");
30 30
 		}
31 31
 		return $this->addToProperty("class", State::LOADING);
@@ -33,56 +33,56 @@  discard block
 block discarded – undo
33 33
 
34 34
 	public function labeled($label, $direction=Direction::LEFT, $icon=NULL) {
35 35
 		$field=$this->getField();
36
-		$labelO=$field->addLabel($label,$direction===Direction::LEFT,$icon);
37
-		$field->addToProperty("class", $direction . " labeled");
36
+		$labelO=$field->addLabel($label, $direction===Direction::LEFT, $icon);
37
+		$field->addToProperty("class", $direction." labeled");
38 38
 		return $labelO;
39 39
 	}
40 40
 
41 41
 	public function labeledToCorner($icon, $direction=Direction::LEFT) {
42
-		return $this->labeled("", $direction . " corner", $icon)->toCorner($direction);
42
+		return $this->labeled("", $direction." corner", $icon)->toCorner($direction);
43 43
 	}
44 44
 
45 45
 	public function addAction($action, $direction=Direction::RIGHT, $icon=NULL, $labeled=false) {
46 46
 		$field=$this->getField();
47 47
 		$actionO=$action;
48
-		if (\is_object($action) === false) {
49
-			$actionO=new HtmlButton("action-" . $this->identifier, $action);
48
+		if (\is_object($action)===false) {
49
+			$actionO=new HtmlButton("action-".$this->identifier, $action);
50 50
 			if (isset($icon))
51 51
 				$actionO->addIcon($icon, true, $labeled);
52 52
 		}
53
-		$field->addToProperty("class", $direction . " action");
54
-		$field->addContent($actionO, \strstr($direction, Direction::LEFT) !== false);
53
+		$field->addToProperty("class", $direction." action");
54
+		$field->addContent($actionO, \strstr($direction, Direction::LEFT)!==false);
55 55
 		return $actionO;
56 56
 	}
57 57
 
58
-	public function addDropdown($label="", $items=array(),$direction=Direction::RIGHT){
59
-		$labelO=new HtmlDropdown("dd-".$this->identifier,$label,$items);
60
-		$labelO->asSelect("select-".$this->identifier,false,true);
61
-		return $this->labeled($labelO,$direction);
58
+	public function addDropdown($label="", $items=array(), $direction=Direction::RIGHT) {
59
+		$labelO=new HtmlDropdown("dd-".$this->identifier, $label, $items);
60
+		$labelO->asSelect("select-".$this->identifier, false, true);
61
+		return $this->labeled($labelO, $direction);
62 62
 	}
63 63
 
64 64
 	public function setTransparent() {
65 65
 		return $this->getField()->addToProperty("class", "transparent");
66 66
 	}
67 67
 
68
-	public function setReadonly(){
68
+	public function setReadonly() {
69 69
 		$this->getDataField()->setProperty("readonly", "");
70 70
 		return $this;
71 71
 	}
72 72
 
73
-	public function setName($name){
74
-		$this->getDataField()->setProperty("name",$name);
73
+	public function setName($name) {
74
+		$this->getDataField()->setProperty("name", $name);
75 75
 		return $this;
76 76
 	}
77 77
 
78
-	public function setFluid(){
79
-		$this->getField()->addToProperty("class","fluid");
78
+	public function setFluid() {
79
+		$this->getField()->addToProperty("class", "fluid");
80 80
 		return $this;
81 81
 	}
82 82
 
83 83
 	public function setDisabled($disable=true) {
84 84
 		$field=$this->getField();
85
-		if($disable)
85
+		if ($disable)
86 86
 			$field->addToProperty("class", "disabled");
87 87
 		return $this;
88 88
 	}
Please login to merge, or discard this patch.