@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | class HtmlOption extends HtmlDoubleElement { |
11 | 11 | protected $value; |
12 | 12 | protected $selected; |
13 | - public function __construct($identifier,$caption,$value="") { |
|
13 | + public function __construct($identifier, $caption, $value="") { |
|
14 | 14 | parent::__construct($identifier, "option"); |
15 | 15 | $this->_template='<option id="%identifier%" value="%value%" %selected% %properties%>%content%</option>'; |
16 | 16 | $this->content=$caption; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $this->selected=""; |
19 | 19 | } |
20 | 20 | |
21 | - public function select(){ |
|
21 | + public function select() { |
|
22 | 22 | $this->selected="selected"; |
23 | 23 | return $this; |
24 | 24 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | return $this->value; |
28 | 28 | } |
29 | 29 | public function setValue($value) { |
30 | - $this->value = $value; |
|
30 | + $this->value=$value; |
|
31 | 31 | return $this; |
32 | 32 | } |
33 | 33 |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | class HtmlImg extends HtmlSingleElement { |
9 | 9 | |
10 | - public function __construct($identifier,$src="",$alt="") { |
|
10 | + public function __construct($identifier, $src="", $alt="") { |
|
11 | 11 | parent::__construct($identifier, "img"); |
12 | 12 | $this->setSrc($src); |
13 | 13 | $this->setAlt($alt); |
@@ -14,8 +14,8 @@ |
||
14 | 14 | parent::__construct($identifier, "ul"); |
15 | 15 | $this->addItems($items); |
16 | 16 | } |
17 | - public function setOrdered($ordered=true){ |
|
18 | - $this->tagName=($ordered===true)?"ol":"ul"; |
|
17 | + public function setOrdered($ordered=true) { |
|
18 | + $this->tagName=($ordered===true) ? "ol" : "ul"; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | /** |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function addOption($element,$value="",$selected=false){ |
26 | 26 | if($element instanceof HtmlOption){ |
27 | 27 | $option=$element; |
28 | - }else{ |
|
28 | + } else{ |
|
29 | 29 | $option=new HtmlOption($this->identifier."-".count($this->options), $element,$value); |
30 | 30 | } |
31 | 31 | if($selected || $option->getValue()==$this->getProperty("value")){ |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | foreach ($array as $k=>$v){ |
65 | 65 | $this->addOption($v, $k); |
66 | 66 | } |
67 | - }else{ |
|
67 | + } else{ |
|
68 | 68 | foreach ($array as $v){ |
69 | 69 | $this->addOption($v, $v); |
70 | 70 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | private $default; |
14 | 14 | private $options; |
15 | 15 | |
16 | - public function __construct($identifier, $caption="",$default=NULL) { |
|
16 | + public function __construct($identifier, $caption="", $default=NULL) { |
|
17 | 17 | parent::__construct($identifier, "select"); |
18 | 18 | $this->setProperty("name", $identifier); |
19 | 19 | $this->setProperty("class", "form-control"); |
@@ -22,21 +22,21 @@ discard block |
||
22 | 22 | $this->options=array(); |
23 | 23 | } |
24 | 24 | |
25 | - public function addOption($element,$value="",$selected=false){ |
|
26 | - if($element instanceof HtmlOption){ |
|
25 | + public function addOption($element, $value="", $selected=false) { |
|
26 | + if ($element instanceof HtmlOption) { |
|
27 | 27 | $option=$element; |
28 | - }else{ |
|
29 | - $option=new HtmlOption($this->identifier."-".count($this->options), $element,$value); |
|
28 | + } else { |
|
29 | + $option=new HtmlOption($this->identifier."-".count($this->options), $element, $value); |
|
30 | 30 | } |
31 | - if($selected || $option->getValue()==$this->getProperty("value")){ |
|
31 | + if ($selected || $option->getValue()==$this->getProperty("value")) { |
|
32 | 32 | $option->select(); |
33 | 33 | } |
34 | 34 | $this->options[]=$option; |
35 | 35 | } |
36 | 36 | |
37 | 37 | public function setValue($value) { |
38 | - foreach ( $this->options as $option ) { |
|
39 | - if (strcasecmp($option->getValue(),$value)===0) { |
|
38 | + foreach ($this->options as $option) { |
|
39 | + if (strcasecmp($option->getValue(), $value)===0) { |
|
40 | 40 | $option->setProperty("selected", ""); |
41 | 41 | } |
42 | 42 | } |
@@ -49,23 +49,23 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function compile(JsUtils $js=NULL, &$view=NULL) { |
51 | 51 | $this->content=array(); |
52 | - if(isset($this->default)){ |
|
52 | + if (isset($this->default)) { |
|
53 | 53 | $default=new HtmlOption("", $this->default); |
54 | 54 | $this->content[]=$default; |
55 | 55 | } |
56 | - foreach ($this->options as $option){ |
|
56 | + foreach ($this->options as $option) { |
|
57 | 57 | $this->content[]=$option; |
58 | 58 | } |
59 | 59 | return parent::compile($js, $view); |
60 | 60 | } |
61 | 61 | |
62 | - public function fromArray($array){ |
|
63 | - if(JArray::isAssociative($array)){ |
|
64 | - foreach ($array as $k=>$v){ |
|
62 | + public function fromArray($array) { |
|
63 | + if (JArray::isAssociative($array)) { |
|
64 | + foreach ($array as $k=>$v) { |
|
65 | 65 | $this->addOption($v, $k); |
66 | 66 | } |
67 | - }else{ |
|
68 | - foreach ($array as $v){ |
|
67 | + } else { |
|
68 | + foreach ($array as $v) { |
|
69 | 69 | $this->addOption($v, $v); |
70 | 70 | } |
71 | 71 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $this->addOption($function($object)); |
99 | 99 | } |
100 | 100 | |
101 | - public function setSize($size){ |
|
101 | + public function setSize($size) { |
|
102 | 102 | return $this->setProperty("size", $size); |
103 | 103 | } |
104 | 104 | } |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | -return array ( |
|
3 | - "JQuery" => array ( |
|
4 | - "MaxCDN" => array ( |
|
2 | +return array( |
|
3 | + "JQuery" => array( |
|
4 | + "MaxCDN" => array( |
|
5 | 5 | "url" => "http://code.jquery.com/jquery-%version%.min.js", |
6 | - "versions" => array ( |
|
6 | + "versions" => array( |
|
7 | 7 | "2.2.3", |
8 | 8 | "2.2.1", |
9 | 9 | "2.1.4", |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | "1.11.2" |
12 | 12 | ) |
13 | 13 | ), |
14 | - "Google" => array ( |
|
14 | + "Google" => array( |
|
15 | 15 | "url" => "https://ajax.googleapis.com/ajax/libs/jquery/%version%/jquery.min.js", |
16 | - "versions" => array ( |
|
16 | + "versions" => array( |
|
17 | 17 | "2.2.2", |
18 | 18 | "2.2.1", |
19 | 19 | "2.2.0", |
@@ -25,17 +25,17 @@ discard block |
||
25 | 25 | ) |
26 | 26 | ) |
27 | 27 | ), |
28 | - "JQueryUI" => array ( |
|
29 | - "MaxCDN" => array ( |
|
28 | + "JQueryUI" => array( |
|
29 | + "MaxCDN" => array( |
|
30 | 30 | "core" => "http://code.jquery.com/ui/%version%/jquery-ui.min.js", |
31 | 31 | "css" => "http://code.jquery.com/ui/%version%/themes/%theme%/jquery-ui.css", |
32 | - "versions" => array ( |
|
32 | + "versions" => array( |
|
33 | 33 | "1.11.4", |
34 | 34 | "1.11.3", |
35 | 35 | "1.11.2", |
36 | 36 | "1.10.4" |
37 | 37 | ), |
38 | - "themes" => array ( |
|
38 | + "themes" => array( |
|
39 | 39 | "black-tie", |
40 | 40 | "blitzer", |
41 | 41 | "cupertino", |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | "vader" |
63 | 63 | ) |
64 | 64 | ), |
65 | - "Google" => array ( |
|
65 | + "Google" => array( |
|
66 | 66 | "core" => "https://ajax.googleapis.com/ajax/libs/jqueryui/%version%/jquery-ui.min.js", |
67 | 67 | "css" => "https://ajax.googleapis.com/ajax/libs/jqueryui/%version%/themes/%theme%/jquery-ui.css", |
68 | - "versions" => array ( |
|
68 | + "versions" => array( |
|
69 | 69 | "1.11.4", |
70 | 70 | "1.11.3", |
71 | 71 | "1.11.2", |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | "1.10.4", |
75 | 75 | "1.10.0" |
76 | 76 | ), |
77 | - "themes" => array ( |
|
77 | + "themes" => array( |
|
78 | 78 | "black-tie", |
79 | 79 | "blitzer", |
80 | 80 | "cupertino", |
@@ -102,25 +102,25 @@ discard block |
||
102 | 102 | ) |
103 | 103 | ) |
104 | 104 | ), |
105 | - "Bootstrap" => array ( |
|
106 | - "MaxCDN" => array ( |
|
105 | + "Bootstrap" => array( |
|
106 | + "MaxCDN" => array( |
|
107 | 107 | "core" => "http://maxcdn.bootstrapcdn.com/bootstrap/%version%/js/bootstrap.min.js", |
108 | 108 | "css" => "http://maxcdn.bootstrapcdn.com/bootstrap/%version%/css/bootstrap.min.css", |
109 | - "versions" => array ( |
|
109 | + "versions" => array( |
|
110 | 110 | "3.3.6", |
111 | 111 | "3.3.5" |
112 | 112 | ), |
113 | - "themes" => array () |
|
113 | + "themes" => array() |
|
114 | 114 | ) |
115 | 115 | ), |
116 | - "Semantic" => array ( |
|
117 | - "cdnjs" => array ( |
|
116 | + "Semantic" => array( |
|
117 | + "cdnjs" => array( |
|
118 | 118 | "core" => "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/%version%/semantic.min.js", |
119 | 119 | "css" => "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/%version%/semantic.min.css", |
120 | - "versions" => array ( |
|
120 | + "versions" => array( |
|
121 | 121 | "2.1.8" |
122 | 122 | ), |
123 | - "themes" => array () |
|
123 | + "themes" => array() |
|
124 | 124 | ) |
125 | 125 | ) |
126 | 126 | ); |
127 | 127 | \ No newline at end of file |
@@ -9,7 +9,7 @@ |
||
9 | 9 | protected $localCss; |
10 | 10 | protected $framework; |
11 | 11 | |
12 | - public function __construct($framework,$version, $provider="MaxCDN") { |
|
12 | + public function __construct($framework, $version, $provider="MaxCDN") { |
|
13 | 13 | parent::__construct($version, $provider); |
14 | 14 | $this->framework=$framework; |
15 | 15 | $this->data=$this->data [$framework]; |
@@ -60,10 +60,10 @@ |
||
60 | 60 | |
61 | 61 | protected function replaceVersionAndTheme($url, $version, $theme) { |
62 | 62 | if (isset($theme)) |
63 | - return str_ireplace(array ( |
|
63 | + return str_ireplace(array( |
|
64 | 64 | "%theme%", |
65 | 65 | "%version%" |
66 | - ), array ( |
|
66 | + ), array( |
|
67 | 67 | $theme, |
68 | 68 | $version |
69 | 69 | ), $url); |
@@ -33,11 +33,13 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | protected function getUrlOrCss($element, $key) { |
36 | - if (isset($element)) |
|
37 | - return $element; |
|
36 | + if (isset($element)) { |
|
37 | + return $element; |
|
38 | + } |
|
38 | 39 | $version=$this->version; |
39 | - if (array_search($version, $this->getVersions())===false) |
|
40 | - $version=$this->getLastVersion(); |
|
40 | + if (array_search($version, $this->getVersions())===false) { |
|
41 | + $version=$this->getLastVersion(); |
|
42 | + } |
|
41 | 43 | return $this->replaceVersion($this->data [$this->provider] [$key], $version); |
42 | 44 | } |
43 | 45 | |
@@ -59,16 +61,17 @@ discard block |
||
59 | 61 | } |
60 | 62 | |
61 | 63 | protected function replaceVersionAndTheme($url, $version, $theme) { |
62 | - if (isset($theme)) |
|
63 | - return str_ireplace(array ( |
|
64 | + if (isset($theme)) { |
|
65 | + return str_ireplace(array ( |
|
64 | 66 | "%theme%", |
65 | 67 | "%version%" |
66 | 68 | ), array ( |
67 | 69 | $theme, |
68 | 70 | $version |
69 | 71 | ), $url); |
70 | - else |
|
71 | - return $this->replaceVersion($url, $version); |
|
72 | + } else { |
|
73 | + return $this->replaceVersion($url, $version); |
|
74 | + } |
|
72 | 75 | } |
73 | 76 | |
74 | 77 | public function getProviders() { |
@@ -76,10 +79,11 @@ discard block |
||
76 | 79 | } |
77 | 80 | |
78 | 81 | public function getVersions($provider=NULL) { |
79 | - if (isset($provider)) |
|
80 | - return $this->data [$provider] ["versions"]; |
|
81 | - else |
|
82 | - return $this->data [$this->provider] ["versions"]; |
|
82 | + if (isset($provider)) { |
|
83 | + return $this->data [$provider] ["versions"]; |
|
84 | + } else { |
|
85 | + return $this->data [$this->provider] ["versions"]; |
|
86 | + } |
|
83 | 87 | } |
84 | 88 | |
85 | 89 | public function getLastVersion($provider=NULL) { |
@@ -14,10 +14,11 @@ discard block |
||
14 | 14 | $this->data=$this->data ["JQueryUI"]; |
15 | 15 | if (is_int($theme)) { |
16 | 16 | $themes=$this->getThemes(); |
17 | - if (sizeof($themes)>$theme-1) |
|
18 | - $this->theme=$themes [$theme-1]; |
|
19 | - else |
|
20 | - throw new \Exception("CDNGuiGen : Le numéro de thème demandé n'existe pas"); |
|
17 | + if (sizeof($themes)>$theme-1) { |
|
18 | + $this->theme=$themes [$theme-1]; |
|
19 | + } else { |
|
20 | + throw new \Exception("CDNGuiGen : Le numéro de thème demandé n'existe pas"); |
|
21 | + } |
|
21 | 22 | } |
22 | 23 | $this->theme=$theme; |
23 | 24 | $this->cssUrl=null; |
@@ -28,16 +29,18 @@ discard block |
||
28 | 29 | } |
29 | 30 | |
30 | 31 | public function getThemes($provider=NULL) { |
31 | - if (isset($provider)) |
|
32 | - return $this->data [$provider] ["themes"]; |
|
33 | - else |
|
34 | - return $this->data [$this->provider] ["themes"]; |
|
32 | + if (isset($provider)) { |
|
33 | + return $this->data [$provider] ["themes"]; |
|
34 | + } else { |
|
35 | + return $this->data [$this->provider] ["themes"]; |
|
36 | + } |
|
35 | 37 | } |
36 | 38 | |
37 | 39 | public function getFirstTheme($provider=NULL) { |
38 | 40 | $themes=$this->getThemes($provider); |
39 | - if (sizeof($themes)>0) |
|
40 | - return $themes [0]; |
|
41 | + if (sizeof($themes)>0) { |
|
42 | + return $themes [0]; |
|
43 | + } |
|
41 | 44 | return ""; |
42 | 45 | } |
43 | 46 | |
@@ -46,14 +49,17 @@ discard block |
||
46 | 49 | } |
47 | 50 | |
48 | 51 | public function getCss() { |
49 | - if (isset($this->cssUrl)) |
|
50 | - return $this->cssUrl; |
|
52 | + if (isset($this->cssUrl)) { |
|
53 | + return $this->cssUrl; |
|
54 | + } |
|
51 | 55 | $version=$this->version; |
52 | - if (array_search($version, $this->getVersions())===false) |
|
53 | - $version=$this->getLastVersion(); |
|
56 | + if (array_search($version, $this->getVersions())===false) { |
|
57 | + $version=$this->getLastVersion(); |
|
58 | + } |
|
54 | 59 | $theme=$this->theme; |
55 | - if (array_search($theme, $this->getThemes())===false) |
|
56 | - $theme=$this->getFirstTheme(); |
|
60 | + if (array_search($theme, $this->getThemes())===false) { |
|
61 | + $theme=$this->getFirstTheme(); |
|
62 | + } |
|
57 | 63 | return $this->replaceVersionAndTheme($this->data [$this->provider] ["css"], $version, $theme); |
58 | 64 | } |
59 | 65 |
@@ -17,12 +17,15 @@ discard block |
||
17 | 17 | parent::__construct($identifier, "a"); |
18 | 18 | $this->setClass("item"); |
19 | 19 | $this->setContent($content); |
20 | - if($value!==NULL) |
|
21 | - $this->setData($value); |
|
22 | - if($image!==NULL) |
|
23 | - $this->asMiniAvatar($image); |
|
24 | - if($description!==NULL) |
|
25 | - $this->setDescription($description); |
|
20 | + if($value!==NULL) { |
|
21 | + $this->setData($value); |
|
22 | + } |
|
23 | + if($image!==NULL) { |
|
24 | + $this->asMiniAvatar($image); |
|
25 | + } |
|
26 | + if($description!==NULL) { |
|
27 | + $this->setDescription($description); |
|
28 | + } |
|
26 | 29 | } |
27 | 30 | |
28 | 31 | public function setDescription($description){ |
@@ -39,8 +42,9 @@ discard block |
||
39 | 42 | |
40 | 43 | public function asOption(){ |
41 | 44 | $this->tagName="option"; |
42 | - if($this->getProperty("data-value")!==null) |
|
43 | - $this->setProperty("value", $this->getProperty("data-value")); |
|
45 | + if($this->getProperty("data-value")!==null) { |
|
46 | + $this->setProperty("value", $this->getProperty("data-value")); |
|
47 | + } |
|
44 | 48 | } |
45 | 49 | |
46 | 50 | /** |
@@ -12,34 +12,34 @@ discard block |
||
12 | 12 | use Ajax\semantic\html\base\traits\MenuItemTrait; |
13 | 13 | |
14 | 14 | class HtmlDropdownItem extends HtmlSemDoubleElement { |
15 | - use IconTrait,MenuItemTrait; |
|
16 | - public function __construct($identifier, $content="",$value=NULL,$image=NULL,$description=NULL) { |
|
15 | + use IconTrait, MenuItemTrait; |
|
16 | + public function __construct($identifier, $content="", $value=NULL, $image=NULL, $description=NULL) { |
|
17 | 17 | parent::__construct($identifier, "a"); |
18 | 18 | $this->setClass("item"); |
19 | 19 | $this->setContent($content); |
20 | - if($value!==NULL) |
|
20 | + if ($value!==NULL) |
|
21 | 21 | $this->setData($value); |
22 | - if($image!==NULL) |
|
22 | + if ($image!==NULL) |
|
23 | 23 | $this->asMiniAvatar($image); |
24 | - if($description!==NULL) |
|
24 | + if ($description!==NULL) |
|
25 | 25 | $this->setDescription($description); |
26 | 26 | } |
27 | 27 | |
28 | - public function setDescription($description){ |
|
29 | - $descO=new HtmlDoubleElement("desc-".$this->identifier,"span"); |
|
28 | + public function setDescription($description) { |
|
29 | + $descO=new HtmlDoubleElement("desc-".$this->identifier, "span"); |
|
30 | 30 | $descO->setClass("description"); |
31 | 31 | $descO->setContent($description); |
32 | - return $this->addContent($descO,true); |
|
32 | + return $this->addContent($descO, true); |
|
33 | 33 | } |
34 | 34 | |
35 | - public function setData($value){ |
|
35 | + public function setData($value) { |
|
36 | 36 | $this->setProperty("data-value", $value); |
37 | 37 | return $this; |
38 | 38 | } |
39 | 39 | |
40 | - public function asOption(){ |
|
40 | + public function asOption() { |
|
41 | 41 | $this->tagName="option"; |
42 | - if($this->getProperty("data-value")!==null) |
|
42 | + if ($this->getProperty("data-value")!==null) |
|
43 | 43 | $this->setProperty("value", $this->getProperty("data-value")); |
44 | 44 | } |
45 | 45 | |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | * @param string $image the image src |
48 | 48 | * @return $this |
49 | 49 | */ |
50 | - public function asMiniAvatar($image){ |
|
50 | + public function asMiniAvatar($image) { |
|
51 | 51 | $this->tagName="div"; |
52 | - $img=new HtmlImg("image-".$this->identifier,$image); |
|
52 | + $img=new HtmlImg("image-".$this->identifier, $image); |
|
53 | 53 | $img->setClass("ui mini avatar image"); |
54 | - $this->addContent($img,true); |
|
54 | + $this->addContent($img, true); |
|
55 | 55 | return $this; |
56 | 56 | } |
57 | 57 | |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | * @param string $icon |
61 | 61 | * @return HtmlDropdownItem |
62 | 62 | */ |
63 | - public function asIcon($caption,$icon){ |
|
63 | + public function asIcon($caption, $icon) { |
|
64 | 64 | $this->setContent($caption); |
65 | - $this->addContent(new HtmlIcon("", $icon),true); |
|
65 | + $this->addContent(new HtmlIcon("", $icon), true); |
|
66 | 66 | return $this; |
67 | 67 | } |
68 | 68 | |
@@ -71,23 +71,23 @@ discard block |
||
71 | 71 | * @param string $color |
72 | 72 | * @return HtmlDropdownItem |
73 | 73 | */ |
74 | - public function asCircularLabel($caption,$color){ |
|
74 | + public function asCircularLabel($caption, $color) { |
|
75 | 75 | $this->setContent($caption); |
76 | 76 | $lbl=new HtmlLabel(""); |
77 | 77 | $lbl->setCircular()->setColor($color)->setEmpty(); |
78 | - $this->addContent($lbl,true); |
|
78 | + $this->addContent($lbl, true); |
|
79 | 79 | return $this; |
80 | 80 | } |
81 | 81 | |
82 | 82 | |
83 | 83 | |
84 | 84 | public function addMenuItem($items) { |
85 | - $menu=new HtmlMenu("menu-" . $this->identifier, $items); |
|
85 | + $menu=new HtmlMenu("menu-".$this->identifier, $items); |
|
86 | 86 | $content=$this->content; |
87 | 87 | $this->setTagName("div"); |
88 | 88 | $this->setProperty("class", "item"); |
89 | 89 | $icon=new HtmlIcon("", "dropdown"); |
90 | - $this->content=[$icon,new HtmlSemDoubleElement("","span","text",$content),$menu]; |
|
90 | + $this->content=[$icon, new HtmlSemDoubleElement("", "span", "text", $content), $menu]; |
|
91 | 91 | return $menu; |
92 | 92 | } |
93 | 93 | |
@@ -96,14 +96,14 @@ discard block |
||
96 | 96 | * @param string $icon |
97 | 97 | * @return HtmlDropdownItem |
98 | 98 | */ |
99 | - public static function searchInput($placeholder=NULL,$icon=NULL){ |
|
100 | - return (new HtmlDropdownItem(""))->asSearchInput($placeholder,$icon); |
|
99 | + public static function searchInput($placeholder=NULL, $icon=NULL) { |
|
100 | + return (new HtmlDropdownItem(""))->asSearchInput($placeholder, $icon); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
104 | 104 | * @return HtmlDropdownItem |
105 | 105 | */ |
106 | - public static function divider(){ |
|
106 | + public static function divider() { |
|
107 | 107 | return (new HtmlDropdownItem(""))->asDivider(); |
108 | 108 | } |
109 | 109 | |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | * @param string $icon |
113 | 113 | * @return HtmlDropdownItem |
114 | 114 | */ |
115 | - public static function header($caption=NULL,$icon=NULL){ |
|
116 | - return (new HtmlDropdownItem(""))->asHeader($caption,$icon); |
|
115 | + public static function header($caption=NULL, $icon=NULL) { |
|
116 | + return (new HtmlDropdownItem(""))->asHeader($caption, $icon); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -121,8 +121,8 @@ discard block |
||
121 | 121 | * @param string $color |
122 | 122 | * @return HtmlDropdownItem |
123 | 123 | */ |
124 | - public static function circular($caption,$color){ |
|
125 | - return (new HtmlDropdownItem(""))->asCircularLabel($caption,$color); |
|
124 | + public static function circular($caption, $color) { |
|
125 | + return (new HtmlDropdownItem(""))->asCircularLabel($caption, $color); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -130,8 +130,8 @@ discard block |
||
130 | 130 | * @param string $icon |
131 | 131 | * @return HtmlDropdownItem |
132 | 132 | */ |
133 | - public static function icon($caption,$icon){ |
|
134 | - return (new HtmlDropdownItem(""))->asIcon($caption,$icon); |
|
133 | + public static function icon($caption, $icon) { |
|
134 | + return (new HtmlDropdownItem(""))->asIcon($caption, $icon); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -139,8 +139,8 @@ discard block |
||
139 | 139 | * @param string $image |
140 | 140 | * @return HtmlDropdownItem |
141 | 141 | */ |
142 | - public static function avatar($caption,$image){ |
|
143 | - $dd=new HtmlDropdownItem("",$caption); |
|
142 | + public static function avatar($caption, $image) { |
|
143 | + $dd=new HtmlDropdownItem("", $caption); |
|
144 | 144 | $dd->asMiniAvatar($image); |
145 | 145 | return $dd; |
146 | 146 | } |