@@ -17,14 +17,14 @@ discard block |
||
17 | 17 | * @version 1.001 |
18 | 18 | */ |
19 | 19 | class HtmlHeader extends HtmlSemDoubleElement { |
20 | - use TextAlignmentTrait,AttachedTrait; |
|
20 | + use TextAlignmentTrait, AttachedTrait; |
|
21 | 21 | protected $image; |
22 | 22 | |
23 | 23 | public function __construct($identifier, $niveau=1, $content=NULL, $type="page") { |
24 | 24 | parent::__construct($identifier, "div", "ui header"); |
25 | 25 | $this->_template="<%tagName% id='%identifier%' %properties%>%image%%wrapContentBefore%%content%%wrapContentAfter%</%tagName%>"; |
26 | 26 | if (isset($type)) { |
27 | - if ($type == "page") { |
|
27 | + if ($type=="page") { |
|
28 | 28 | $this->asPageHeader($niveau); |
29 | 29 | } else |
30 | 30 | $this->asContentHeader($niveau); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | public function asPageHeader($niveau) { |
36 | - $this->tagName="h" . $niveau; |
|
36 | + $this->tagName="h".$niveau; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function asContentHeader($niveau) { |
@@ -46,25 +46,25 @@ discard block |
||
46 | 46 | |
47 | 47 | public function asIcon($icon, $title, $subHeader=NULL) { |
48 | 48 | $this->addToProperty("class", "icon"); |
49 | - $this->image=new HtmlIcon("icon-" . $this->identifier, $icon); |
|
49 | + $this->image=new HtmlIcon("icon-".$this->identifier, $icon); |
|
50 | 50 | return $this->asTitle($title, $subHeader); |
51 | 51 | } |
52 | 52 | |
53 | 53 | public function asImage($src, $title, $subHeader=NULL) { |
54 | - $this->image=new HtmlImg("img-" . $this->identifier, $src, $title); |
|
54 | + $this->image=new HtmlImg("img-".$this->identifier, $src, $title); |
|
55 | 55 | return $this->asTitle($title, $subHeader); |
56 | 56 | } |
57 | 57 | |
58 | 58 | public function asTitle($title, $subHeader=NULL) { |
59 | 59 | if (!\is_object($title)) { |
60 | - $this->content=new HtmlDoubleElement("content-" . $this->identifier, "div"); |
|
60 | + $this->content=new HtmlDoubleElement("content-".$this->identifier, "div"); |
|
61 | 61 | $this->content->setContent($title); |
62 | 62 | } else { |
63 | 63 | $this->content=$title; |
64 | 64 | } |
65 | 65 | $this->content->setClass("content"); |
66 | 66 | if (isset($subHeader)) { |
67 | - $sub=new HtmlDoubleElement("subheader-" . $this->identifier, "div"); |
|
67 | + $sub=new HtmlDoubleElement("subheader-".$this->identifier, "div"); |
|
68 | 68 | $sub->setClass("sub header"); |
69 | 69 | $sub->setContent($subHeader); |
70 | 70 | $this->content->addContent($sub); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @version 1.001 |
18 | 18 | */ |
19 | 19 | class HtmlLabel extends HtmlSemDoubleElement { |
20 | - use LabeledIconTrait,HasTimeoutTrait; |
|
20 | + use LabeledIconTrait, HasTimeoutTrait; |
|
21 | 21 | |
22 | 22 | public function __construct($identifier, $caption="", $icon=NULL, $tagName="div") { |
23 | 23 | parent::__construct($identifier, $tagName, "ui label"); |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | * @return HtmlLabel |
33 | 33 | */ |
34 | 34 | public function setPointing($value=Direction::NONE) { |
35 | - if($value==="left" || $value==="right") |
|
35 | + if ($value==="left" || $value==="right") |
|
36 | 36 | return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing")); |
37 | 37 | else |
38 | - return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true)); |
|
38 | + return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing", true)); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -44,15 +44,15 @@ discard block |
||
44 | 44 | * @return HtmlLabel |
45 | 45 | */ |
46 | 46 | public function toCorner($side="left") { |
47 | - return $this->addToPropertyCtrl("class", $side . " corner", array ("right corner","left corner" )); |
|
47 | + return $this->addToPropertyCtrl("class", $side." corner", array("right corner", "left corner")); |
|
48 | 48 | } |
49 | 49 | |
50 | - public function setHorizontal(){ |
|
51 | - return $this->addToPropertyCtrl("class", "hozizontal",array("horizontal")); |
|
50 | + public function setHorizontal() { |
|
51 | + return $this->addToPropertyCtrl("class", "hozizontal", array("horizontal")); |
|
52 | 52 | } |
53 | 53 | |
54 | - public function setFloating(){ |
|
55 | - return $this->addToPropertyCtrl("class", "floating",array("floating")); |
|
54 | + public function setFloating() { |
|
55 | + return $this->addToPropertyCtrl("class", "floating", array("floating")); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | return $this->addToProperty("class", "tag"); |
64 | 64 | } |
65 | 65 | |
66 | - public function setEmpty(){ |
|
66 | + public function setEmpty() { |
|
67 | 67 | $this->content=NULL; |
68 | - return $this->addToPropertyCtrl("class", "empty",array("empty")); |
|
68 | + return $this->addToPropertyCtrl("class", "empty", array("empty")); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | public function setBasic() { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function addEmphasisImage($src, $alt="", $before=true) { |
83 | 83 | $this->addToProperty("class", "image"); |
84 | - return $this->addImage($src,$alt,$before); |
|
84 | + return $this->addImage($src, $alt, $before); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * @return HtmlImg |
93 | 93 | */ |
94 | 94 | public function addAvatarImage($src, $alt="", $before=true) { |
95 | - $img=$this->addImage($src,$alt,$before); |
|
95 | + $img=$this->addImage($src, $alt, $before); |
|
96 | 96 | $img->setClass("ui image"); |
97 | 97 | $img->asAvatar(); |
98 | 98 | return $img; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * @return HtmlImg |
107 | 107 | */ |
108 | 108 | public function addImage($src, $alt="", $before=true) { |
109 | - $img=new HtmlImg("image-" . $this->identifier, $src, $alt); |
|
109 | + $img=new HtmlImg("image-".$this->identifier, $src, $alt); |
|
110 | 110 | $img->setClass(""); |
111 | 111 | $this->addContent($img, $before); |
112 | 112 | return $img; |
@@ -118,21 +118,21 @@ discard block |
||
118 | 118 | * @return HtmlDoubleElement |
119 | 119 | */ |
120 | 120 | public function addDetail($detail) { |
121 | - $div=new HtmlSemDoubleElement("detail-" . $this->identifier, $this->tagName,"detail"); |
|
121 | + $div=new HtmlSemDoubleElement("detail-".$this->identifier, $this->tagName, "detail"); |
|
122 | 122 | $div->setContent($detail); |
123 | 123 | $this->addContent($div); |
124 | 124 | return $div; |
125 | 125 | } |
126 | 126 | |
127 | 127 | public function asRibbon($direction=Direction::NONE) { |
128 | - return $this->addToPropertyCtrl("class", $direction." ribbon", array ("ribbon","right ribbon","left ribbon" )); |
|
128 | + return $this->addToPropertyCtrl("class", $direction." ribbon", array("ribbon", "right ribbon", "left ribbon")); |
|
129 | 129 | } |
130 | 130 | |
131 | - public function setAttached($side=Side::TOP,$direction=Direction::NONE){ |
|
132 | - if($direction!==Direction::NONE) |
|
133 | - return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached")); |
|
131 | + public function setAttached($side=Side::TOP, $direction=Direction::NONE) { |
|
132 | + if ($direction!==Direction::NONE) |
|
133 | + return $this->addToPropertyCtrl("class", $side." ".$direction." attached", Side::getConstantValues($direction." attached")); |
|
134 | 134 | else |
135 | - return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached")); |
|
135 | + return $this->addToPropertyCtrl("class", $side." attached", Side::getConstantValues("attached")); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | public static function ribbon($identifier, $caption) { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @return HtmlIcon |
70 | 70 | */ |
71 | 71 | public function setFlipped($sens="horizontally") { |
72 | - return $this->addToProperty("class", "flipped " . $sens); |
|
72 | + return $this->addToProperty("class", "flipped ".$sens); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * @return HtmlIcon |
79 | 79 | */ |
80 | 80 | public function setRotated($sens="clockwise") { |
81 | - return $this->addToProperty("class", "rotated " . $sens); |
|
81 | + return $this->addToProperty("class", "rotated ".$sens); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -87,12 +87,12 @@ discard block |
||
87 | 87 | * @param string target |
88 | 88 | * @return HtmlIcon |
89 | 89 | */ |
90 | - public function asLink($href=NULL,$target=NULL) { |
|
90 | + public function asLink($href=NULL, $target=NULL) { |
|
91 | 91 | if (isset($href)) { |
92 | 92 | $_target=""; |
93 | - if(isset($target)) |
|
93 | + if (isset($target)) |
|
94 | 94 | $_target="target='{$target}'"; |
95 | - $this->wrap("<a href='" . $href . "' {$_target}>", "</a>"); |
|
95 | + $this->wrap("<a href='".$href."' {$_target}>", "</a>"); |
|
96 | 96 | } |
97 | 97 | return $this->addToProperty("class", "link"); |
98 | 98 | } |
@@ -108,9 +108,9 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function setBordered($inverted=false) { |
110 | 110 | $invertedStr=""; |
111 | - if ($inverted !== false) |
|
111 | + if ($inverted!==false) |
|
112 | 112 | $invertedStr=" inverted"; |
113 | - return $this->addToProperty("class", "bordered" . $invertedStr); |
|
113 | + return $this->addToProperty("class", "bordered".$invertedStr); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | /** |
@@ -122,11 +122,11 @@ discard block |
||
122 | 122 | } |
123 | 123 | |
124 | 124 | public function addLabel($label, $before=false, $icon=NULL) { |
125 | - if($before) |
|
125 | + if ($before) |
|
126 | 126 | $this->wrap($label); |
127 | 127 | else |
128 | 128 | $this->wrap("", $label); |
129 | - if(isset($icon)) |
|
129 | + if (isset($icon)) |
|
130 | 130 | $this->addToIcon($icon); |
131 | 131 | return $this; |
132 | 132 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @return HtmlDivider |
24 | 24 | */ |
25 | 25 | public function setVertical() { |
26 | - return $this->addToPropertyCtrl("class", "vertical", array ("vertical","horizontal" )); |
|
26 | + return $this->addToPropertyCtrl("class", "vertical", array("vertical", "horizontal")); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @return HtmlDivider |
32 | 32 | */ |
33 | 33 | public function setHorizontal() { |
34 | - return $this->addToPropertyCtrl("class", "horizontal", array ("vertical","horizontal" )); |
|
34 | + return $this->addToPropertyCtrl("class", "horizontal", array("vertical", "horizontal")); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | /** |
62 | 62 | * @return HtmlDivider |
63 | 63 | */ |
64 | - public function setIgnored(){ |
|
64 | + public function setIgnored() { |
|
65 | 65 | return $this->addToProperty("class", "ignored"); |
66 | 66 | } |
67 | 67 | } |
68 | 68 | \ No newline at end of file |