@@ -5,8 +5,8 @@ |
||
5 | 5 | use Ajax\common\BaseEnum; |
6 | 6 | |
7 | 7 | class Color extends BaseEnum { |
8 | - const RED="red",ORANGE="orange",YELLOW="yellow", |
|
9 | - OLIVE="olive",GREEN="green",TEAL="teal", |
|
10 | - BLUE="blue",VIOLET="violet",PURPLE="purple", |
|
11 | - PINK="pink",BROWN="brown",GREY="grey",BLACK="black"; |
|
8 | + const RED="red", ORANGE="orange", YELLOW="yellow", |
|
9 | + OLIVE="olive", GREEN="green", TEAL="teal", |
|
10 | + BLUE="blue", VIOLET="violet", PURPLE="purple", |
|
11 | + PINK="pink", BROWN="brown", GREY="grey", BLACK="black"; |
|
12 | 12 | } |
13 | 13 | \ No newline at end of file |
@@ -5,5 +5,5 @@ |
||
5 | 5 | use Ajax\common\BaseEnum; |
6 | 6 | |
7 | 7 | abstract class Emphasis extends BaseEnum { |
8 | - const PRIMARY="",SECONDARY="secondary",TERTIARY="tertiary"; |
|
8 | + const PRIMARY="", SECONDARY="secondary", TERTIARY="tertiary"; |
|
9 | 9 | } |
10 | 10 | \ No newline at end of file |
@@ -5,5 +5,5 @@ |
||
5 | 5 | use Ajax\common\BaseEnum; |
6 | 6 | |
7 | 7 | abstract class Side extends BaseEnum { |
8 | - const BOTTOM="bottom",BOTH="",TOP="top"; |
|
8 | + const BOTTOM="bottom", BOTH="", TOP="top"; |
|
9 | 9 | } |
10 | 10 | \ No newline at end of file |
@@ -2,5 +2,5 @@ |
||
2 | 2 | namespace Ajax\semantic\html\base; |
3 | 3 | use Ajax\common\BaseEnum; |
4 | 4 | abstract class Size extends BaseEnum { |
5 | - const MASSIVE="massive",HUGE="huge",BIG="big",LARGE="large",MEDIUM="",SMALL="small",MINI="mini",TINY="tiny"; |
|
5 | + const MASSIVE="massive", HUGE="huge", BIG="big", LARGE="large", MEDIUM="", SMALL="small", MINI="mini", TINY="tiny"; |
|
6 | 6 | } |
7 | 7 | \ No newline at end of file |
@@ -5,5 +5,5 @@ |
||
5 | 5 | use Ajax\common\BaseEnum; |
6 | 6 | |
7 | 7 | abstract class Variation extends BaseEnum { |
8 | - const ANIMATED="animated",AVATAR="avatar",COMPACT="compact",INVERTED="inverted",PADDED="padded"; |
|
8 | + const ANIMATED="animated", AVATAR="avatar", COMPACT="compact", INVERTED="inverted", PADDED="padded"; |
|
9 | 9 | } |
10 | 10 | \ No newline at end of file |
@@ -7,7 +7,7 @@ |
||
7 | 7 | * @param string $side |
8 | 8 | * @return \Ajax\semantic\html\base\HtmlSemDoubleElement |
9 | 9 | */ |
10 | - public function setAttachment($value=Side::BOTH){ |
|
11 | - return $this->addToPropertyCtrl("class",$value." attached",Side::getConstantValues("attached")); |
|
10 | + public function setAttachment($value=Side::BOTH) { |
|
11 | + return $this->addToPropertyCtrl("class", $value." attached", Side::getConstantValues("attached")); |
|
12 | 12 | } |
13 | 13 | } |
14 | 14 | \ No newline at end of file |
@@ -9,20 +9,20 @@ discard block |
||
9 | 9 | protected $_states=[]; |
10 | 10 | protected $_baseClass; |
11 | 11 | |
12 | - public function addVariation($variation){ |
|
12 | + public function addVariation($variation) { |
|
13 | 13 | return $this->addToPropertyCtrl("class", $variation, $this->_variations); |
14 | 14 | } |
15 | 15 | |
16 | - public function addState($state){ |
|
16 | + public function addState($state) { |
|
17 | 17 | return $this->addToPropertyCtrl("class", $state, $this->_states); |
18 | 18 | } |
19 | 19 | |
20 | - public function setVariation($variation){ |
|
20 | + public function setVariation($variation) { |
|
21 | 21 | $this->setPropertyCtrl("class", $variation, $this->_variations); |
22 | 22 | return $this->addToProperty("class", $this->_baseClass); |
23 | 23 | } |
24 | 24 | |
25 | - public function setState($state){ |
|
25 | + public function setState($state) { |
|
26 | 26 | $this->setPropertyCtrl("class", $state, $this->_states); |
27 | 27 | return $this->addToProperty("class", $this->_baseClass); |
28 | 28 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * {@inheritDoc} |
32 | 32 | * @see \Ajax\common\html\HtmlSingleElement::setSize() |
33 | 33 | */ |
34 | - public function setSize($size){ |
|
34 | + public function setSize($size) { |
|
35 | 35 | return $this->addToPropertyCtrl("class", $size, Size::getConstants()); |
36 | 36 | } |
37 | 37 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * show it is currently unable to be interacted with |
40 | 40 | * @return \Ajax\semantic\html\elements\HtmlSemDoubleElement |
41 | 41 | */ |
42 | - public function setDisabled(){ |
|
42 | + public function setDisabled() { |
|
43 | 43 | return $this->addToProperty("class", "disabled"); |
44 | 44 | } |
45 | 45 | |
@@ -47,18 +47,18 @@ discard block |
||
47 | 47 | * @param string $color |
48 | 48 | * @return \Ajax\semantic\html\base\HtmlSemDoubleElement |
49 | 49 | */ |
50 | - public function setColor($color){ |
|
51 | - return $this->addToPropertyCtrl("class", $color,Color::getConstants()); |
|
50 | + public function setColor($color) { |
|
51 | + return $this->addToPropertyCtrl("class", $color, Color::getConstants()); |
|
52 | 52 | } |
53 | 53 | |
54 | - public function setFluid(){ |
|
54 | + public function setFluid() { |
|
55 | 55 | $this->addToProperty("class", "fluid"); |
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
59 | 59 | * can be formatted to appear on dark backgrounds |
60 | 60 | */ |
61 | - public function setInverted(){ |
|
61 | + public function setInverted() { |
|
62 | 62 | $this->addToProperty("class", "inverted"); |
63 | 63 | } |
64 | 64 | } |
65 | 65 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
10 | 10 | * @param string $value |
11 | 11 | * @return \Ajax\semantic\html\base\HtmlSemDoubleElement |
12 | 12 | */ |
13 | - public function setTextAlignment($value=TextAlignment::LEFT){ |
|
14 | - return $this->addToPropertyCtrl("class", $value,TextAlignment::getConstants()); |
|
13 | + public function setTextAlignment($value=TextAlignment::LEFT) { |
|
14 | + return $this->addToPropertyCtrl("class", $value, TextAlignment::getConstants()); |
|
15 | 15 | } |
16 | 16 | } |
17 | 17 | \ No newline at end of file |
@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | * @param string $type one of text,item |
27 | 27 | * @return \Ajax\semantic\html\collections\HtmlMenu |
28 | 28 | */ |
29 | - public function setType($type=""){ |
|
30 | - return $this->addToPropertyCtrl("class", $type, array("","item","text")); |
|
29 | + public function setType($type="") { |
|
30 | + return $this->addToPropertyCtrl("class", $type, array("", "item", "text")); |
|
31 | 31 | } |
32 | 32 | |
33 | - public function setActiveItem($index){ |
|
33 | + public function setActiveItem($index) { |
|
34 | 34 | $item=$this->getItem($index); |
35 | - if($item!==null){ |
|
35 | + if ($item!==null) { |
|
36 | 36 | $item->addToProperty("class", "active"); |
37 | 37 | } |
38 | 38 | return $this; |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | * {@inheritDoc} |
43 | 43 | * @see \Ajax\common\html\html5\HtmlCollection::addItem() |
44 | 44 | */ |
45 | - public function addItem($item){ |
|
45 | + public function addItem($item) { |
|
46 | 46 | $item=parent::addItem($item); |
47 | - if(!$item instanceof HtmlMenu) |
|
48 | - $item->addToPropertyCtrl("class", "item",array("item")); |
|
49 | - else{ |
|
47 | + if (!$item instanceof HtmlMenu) |
|
48 | + $item->addToPropertyCtrl("class", "item", array("item")); |
|
49 | + else { |
|
50 | 50 | $this->setSecondary(); |
51 | 51 | } |
52 | 52 | } |
@@ -55,51 +55,51 @@ discard block |
||
55 | 55 | * @see \Ajax\common\html\html5\HtmlCollection::createItem() |
56 | 56 | */ |
57 | 57 | protected function createItem($value) { |
58 | - $itemO=new HtmlLink("item-".\sizeof($this->content),"",$value); |
|
58 | + $itemO=new HtmlLink("item-".\sizeof($this->content), "", $value); |
|
59 | 59 | return $itemO->setClass("item"); |
60 | 60 | } |
61 | 61 | |
62 | - public function setInverted(){ |
|
62 | + public function setInverted() { |
|
63 | 63 | return $this->addToProperty("class", "inverted"); |
64 | 64 | } |
65 | 65 | |
66 | - public function setSecondary(){ |
|
66 | + public function setSecondary() { |
|
67 | 67 | return $this->addToProperty("class", "secondary"); |
68 | 68 | } |
69 | 69 | |
70 | - public function setVertical(){ |
|
70 | + public function setVertical() { |
|
71 | 71 | return $this->addToProperty("class", "vertical"); |
72 | 72 | } |
73 | 73 | |
74 | - public function setPosition($value="right"){ |
|
75 | - return $this->addToPropertyCtrl("class", $value,array("right","left")); |
|
74 | + public function setPosition($value="right") { |
|
75 | + return $this->addToPropertyCtrl("class", $value, array("right", "left")); |
|
76 | 76 | } |
77 | 77 | |
78 | - public function setPointing($value=Direction::NONE){ |
|
79 | - return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing")); |
|
78 | + public function setPointing($value=Direction::NONE) { |
|
79 | + return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing")); |
|
80 | 80 | } |
81 | 81 | |
82 | - public function asTab($vertical=false){ |
|
83 | - $this->apply(function(HtmlDoubleElement &$item){$item->setTagName("a");}); |
|
84 | - if($vertical===true) |
|
82 | + public function asTab($vertical=false) { |
|
83 | + $this->apply(function(HtmlDoubleElement & $item) {$item->setTagName("a"); }); |
|
84 | + if ($vertical===true) |
|
85 | 85 | $this->setVertical(); |
86 | 86 | return $this->addToProperty("class", "tabular"); |
87 | 87 | } |
88 | 88 | |
89 | - public function asPagination(){ |
|
90 | - $this->apply(function(HtmlDoubleElement &$item){$item->setTagName("a");}); |
|
89 | + public function asPagination() { |
|
90 | + $this->apply(function(HtmlDoubleElement & $item) {$item->setTagName("a"); }); |
|
91 | 91 | return $this->addToProperty("class", "pagination"); |
92 | 92 | } |
93 | 93 | |
94 | - public function setFixed(){ |
|
94 | + public function setFixed() { |
|
95 | 95 | return $this->addToProperty("class", "fixed"); |
96 | 96 | } |
97 | 97 | |
98 | - public function setFluid(){ |
|
98 | + public function setFluid() { |
|
99 | 99 | return $this->addToProperty("class", "fluid"); |
100 | 100 | } |
101 | 101 | |
102 | - public function setCompact(){ |
|
102 | + public function setCompact() { |
|
103 | 103 | return $this->addToProperty("class", "compact"); |
104 | 104 | } |
105 | 105 | } |
106 | 106 | \ No newline at end of file |