@@ -12,17 +12,17 @@ |
||
12 | 12 | class HtmlContainer extends HtmlSemDoubleElement { |
13 | 13 | |
14 | 14 | public function __construct($identifier, $content="") { |
15 | - parent::__construct($identifier, "div","ui container"); |
|
15 | + parent::__construct($identifier, "div", "ui container"); |
|
16 | 16 | $this->content=$content; |
17 | 17 | } |
18 | 18 | |
19 | - public function setAlignement($value="justified"){ |
|
20 | - if($value!=="justified") |
|
19 | + public function setAlignement($value="justified") { |
|
20 | + if ($value!=="justified") |
|
21 | 21 | $value.=" aligned"; |
22 | 22 | return $this->addToProperty("class", $value); |
23 | 23 | } |
24 | 24 | |
25 | - public function setTextContainer(){ |
|
25 | + public function setTextContainer() { |
|
26 | 26 | return $this->addToProperty("class", "text"); |
27 | 27 | } |
28 | 28 | } |
29 | 29 | \ No newline at end of file |
@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | */ |
12 | 12 | class HtmlDivider extends HtmlDoubleElement { |
13 | 13 | |
14 | - public function __construct($identifier, $content="",$tagName="div") { |
|
15 | - parent::__construct($identifier, $tagName,"ui divider"); |
|
14 | + public function __construct($identifier, $content="", $tagName="div") { |
|
15 | + parent::__construct($identifier, $tagName, "ui divider"); |
|
16 | 16 | $this->content=$content; |
17 | 17 | } |
18 | 18 | |
@@ -20,23 +20,23 @@ discard block |
||
20 | 20 | * vertical divider |
21 | 21 | * @return \Ajax\semantic\html\elements\HtmlDivider |
22 | 22 | */ |
23 | - public function setVertical(){ |
|
24 | - return $this->addToPropertyUnique("class", "vertical", array("vertical","horizontal")); |
|
23 | + public function setVertical() { |
|
24 | + return $this->addToPropertyUnique("class", "vertical", array("vertical", "horizontal")); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
28 | 28 | * horizontal divider |
29 | 29 | * @return \Ajax\semantic\html\elements\HtmlDivider |
30 | 30 | */ |
31 | - public function setHorizontal(){ |
|
32 | - return $this->addToPropertyUnique("class", "horizontal", array("vertical","horizontal")); |
|
31 | + public function setHorizontal() { |
|
32 | + return $this->addToPropertyUnique("class", "horizontal", array("vertical", "horizontal")); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
36 | 36 | * hide the divider |
37 | 37 | * @return \Ajax\semantic\html\elements\HtmlDivider |
38 | 38 | */ |
39 | - public function setHidden(){ |
|
39 | + public function setHidden() { |
|
40 | 40 | return $this->addToProperty("class", "hidden"); |
41 | 41 | } |
42 | 42 | |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | * fitted, without any space above or below it |
45 | 45 | * @return \Ajax\semantic\html\elements\HtmlDivider |
46 | 46 | */ |
47 | - public function setFitted(){ |
|
47 | + public function setFitted() { |
|
48 | 48 | return $this->addToProperty("class", "fitted"); |
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
52 | 52 | * @return \Ajax\semantic\html\elements\HtmlDivider |
53 | 53 | */ |
54 | - public function asHeader(){ |
|
54 | + public function asHeader() { |
|
55 | 55 | return $this->addToProperty("class", "header"); |
56 | 56 | } |
57 | 57 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * inverts the divider colors |
60 | 60 | * @return \Ajax\semantic\html\elements\HtmlDivider |
61 | 61 | */ |
62 | - public function setInverted(){ |
|
62 | + public function setInverted() { |
|
63 | 63 | return $this->addToProperty("class", "inverted"); |
64 | 64 | } |
65 | 65 | } |
66 | 66 | \ No newline at end of file |
@@ -17,11 +17,11 @@ discard block |
||
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 |
||
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 |
@@ -7,15 +7,15 @@ |
||
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 |
@@ -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",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 |
@@ -17,42 +17,42 @@ |
||
17 | 17 | use BaseTrait; |
18 | 18 | protected $_popup=NULL; |
19 | 19 | |
20 | - public function __construct($identifier, $tagName="p",$baseClass="ui",$content=NULL) { |
|
20 | + public function __construct($identifier, $tagName="p", $baseClass="ui", $content=NULL) { |
|
21 | 21 | parent::__construct($identifier, $tagName); |
22 | 22 | $this->_baseClass=$baseClass; |
23 | 23 | $this->setClass($baseClass); |
24 | - if(isset($content)){ |
|
24 | + if (isset($content)) { |
|
25 | 25 | $this->content=$content; |
26 | 26 | } |
27 | 27 | } |
28 | 28 | |
29 | - public function setPopupAttributes($variation=NULL,$popupEvent=NULL){ |
|
30 | - if(isset($this->_popup)) |
|
31 | - $this->_popup->setAttributes($variation,$popupEvent); |
|
29 | + public function setPopupAttributes($variation=NULL, $popupEvent=NULL) { |
|
30 | + if (isset($this->_popup)) |
|
31 | + $this->_popup->setAttributes($variation, $popupEvent); |
|
32 | 32 | } |
33 | 33 | |
34 | - public function addPopup($title="",$content="",$variation=NULL,$params=array()){ |
|
35 | - $this->_popup=new InternalPopup($this,$title,$content,$variation,$params); |
|
34 | + public function addPopup($title="", $content="", $variation=NULL, $params=array()) { |
|
35 | + $this->_popup=new InternalPopup($this, $title, $content, $variation, $params); |
|
36 | 36 | return $this; |
37 | 37 | } |
38 | 38 | |
39 | - public function addPopupHtml($html="",$variation=NULL,$params=array()){ |
|
39 | + public function addPopupHtml($html="", $variation=NULL, $params=array()) { |
|
40 | 40 | $this->_popup=new InternalPopup($this); |
41 | 41 | $this->_popup->setHtml($html); |
42 | - $this->_popup->setAttributes($variation,$params); |
|
42 | + $this->_popup->setAttributes($variation, $params); |
|
43 | 43 | return $this; |
44 | 44 | } |
45 | 45 | |
46 | - public function compile(JsUtils $js=NULL, View $view=NULL){ |
|
47 | - if(isset($this->_popup)) |
|
46 | + public function compile(JsUtils $js=NULL, View $view=NULL) { |
|
47 | + if (isset($this->_popup)) |
|
48 | 48 | $this->_popup->compile(); |
49 | - return parent::compile($js,$view); |
|
49 | + return parent::compile($js, $view); |
|
50 | 50 | } |
51 | - public function run(JsUtils $js){ |
|
51 | + public function run(JsUtils $js) { |
|
52 | 52 | $this->_bsComponent=$js->semantic()->generic("#".$this->identifier); |
53 | 53 | parent::run($js); |
54 | 54 | $this->addEventsOnRun($js); |
55 | - if(isset($this->_popup)){ |
|
55 | + if (isset($this->_popup)) { |
|
56 | 56 | $this->_popup->run($js); |
57 | 57 | } |
58 | 58 | return $this->_bsComponent; |
@@ -7,15 +7,15 @@ |
||
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 |
@@ -6,20 +6,20 @@ discard block |
||
6 | 6 | use Ajax\semantic\html\base\HtmlSemCollection; |
7 | 7 | use Ajax\semantic\html\base\constants\Sens; |
8 | 8 | |
9 | -class HtmlSegmentGroups extends HtmlSemCollection{ |
|
9 | +class HtmlSegmentGroups extends HtmlSemCollection { |
|
10 | 10 | |
11 | 11 | |
12 | - public function __construct( $identifier, $items=array()){ |
|
13 | - parent::__construct( $identifier, "div","ui segments"); |
|
12 | + public function __construct($identifier, $items=array()) { |
|
13 | + parent::__construct($identifier, "div", "ui segments"); |
|
14 | 14 | $this->addItems($items); |
15 | 15 | } |
16 | 16 | |
17 | 17 | |
18 | - protected function createItem($value){ |
|
19 | - return new HtmlSegment("segment-".$this->count(),$value); |
|
18 | + protected function createItem($value) { |
|
19 | + return new HtmlSegment("segment-".$this->count(), $value); |
|
20 | 20 | } |
21 | 21 | |
22 | - protected function createCondition($value){ |
|
22 | + protected function createCondition($value) { |
|
23 | 23 | return !($value instanceof HtmlSegment); |
24 | 24 | } |
25 | 25 | |
@@ -28,16 +28,16 @@ discard block |
||
28 | 28 | * @param string $type one of "raised","stacked","piled" default : "" |
29 | 29 | * @return \Ajax\semantic\html\elements\HtmlSegmentGroups |
30 | 30 | */ |
31 | - public function setType($type){ |
|
31 | + public function setType($type) { |
|
32 | 32 | return $this->addToPropertyCtrl("class", $type, SegmentType::getConstants()); |
33 | 33 | } |
34 | 34 | |
35 | - public function setSens($sens=Sens::VERTICAL){ |
|
35 | + public function setSens($sens=Sens::VERTICAL) { |
|
36 | 36 | return $this->addToPropertyCtrl("class", $sens, Sens::getConstants()); |
37 | 37 | } |
38 | 38 | |
39 | - public static function group($identifier,$items=array(),$type="",$sens=Sens::VERTICAL){ |
|
40 | - $group=new HtmlSegmentGroups($identifier,$items); |
|
39 | + public static function group($identifier, $items=array(), $type="", $sens=Sens::VERTICAL) { |
|
40 | + $group=new HtmlSegmentGroups($identifier, $items); |
|
41 | 41 | $group->setSens($sens); |
42 | 42 | return $group->setType($type); |
43 | 43 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * @author jc |
15 | 15 | * @version 1.001 |
16 | 16 | */ |
17 | -class HtmlBreadcrumb extends HtmlSemNavElement{ |
|
17 | +class HtmlBreadcrumb extends HtmlSemNavElement { |
|
18 | 18 | /** |
19 | 19 | * @var integer the start index for href generation |
20 | 20 | */ |
@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | * @param boolean $autoActive sets the last element's class to <b>active</b> if true |
41 | 41 | * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()} |
42 | 42 | */ |
43 | - public function __construct( $identifier,$items=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){ |
|
44 | - parent::__construct( $identifier, "div", "ui breadcrumb"); |
|
43 | + public function __construct($identifier, $items=array(), $autoActive=true, $startIndex=0, $hrefFunction=NULL) { |
|
44 | + parent::__construct($identifier, "div", "ui breadcrumb"); |
|
45 | 45 | $this->startIndex=$startIndex; |
46 | 46 | $this->autoActive=$autoActive; |
47 | 47 | $this->_contentSeparator="<div class='divider'> / </div>"; |
48 | - $this->_hrefFunction=function ($e){return $e->getContent();}; |
|
49 | - if(isset($hrefFunction)){ |
|
48 | + $this->_hrefFunction=function($e) {return $e->getContent(); }; |
|
49 | + if (isset($hrefFunction)) { |
|
50 | 50 | $this->_hrefFunction=$hrefFunction; |
51 | 51 | } |
52 | 52 | $this->addItems($items); |
@@ -59,23 +59,23 @@ discard block |
||
59 | 59 | * @param string $attr the html attribute used to build the elements url |
60 | 60 | * @return HtmlBreadcrumbs |
61 | 61 | */ |
62 | - public function autoGetOnClick($targetSelector){ |
|
63 | - return $this->getOnClick($this->root, $targetSelector,array("attr"=>$this->attr)); |
|
62 | + public function autoGetOnClick($targetSelector) { |
|
63 | + return $this->getOnClick($this->root, $targetSelector, array("attr"=>$this->attr)); |
|
64 | 64 | } |
65 | 65 | |
66 | - public function contentAsString(){ |
|
67 | - if($this->autoActive){ |
|
66 | + public function contentAsString() { |
|
67 | + if ($this->autoActive) { |
|
68 | 68 | $this->setActive(); |
69 | 69 | } |
70 | 70 | return parent::contentAsString(); |
71 | 71 | } |
72 | 72 | |
73 | - public function setActive($index=null){ |
|
74 | - if(!isset($index)){ |
|
73 | + public function setActive($index=null) { |
|
74 | + if (!isset($index)) { |
|
75 | 75 | $index=sizeof($this->content)-1; |
76 | 76 | } |
77 | 77 | $activeItem=$this->content[$index]; |
78 | - $activeItem->addToProperty("class","active"); |
|
78 | + $activeItem->addToProperty("class", "active"); |
|
79 | 79 | $activeItem->setTagName("div"); |
80 | 80 | } |
81 | 81 | |
@@ -84,15 +84,15 @@ discard block |
||
84 | 84 | * @param Dispatcher $dispatcher the request dispatcher |
85 | 85 | * @return \Ajax\bootstrap\html\HtmlBreadcrumbs |
86 | 86 | */ |
87 | - public function fromDispatcher($dispatcher,$startIndex=0){ |
|
87 | + public function fromDispatcher($dispatcher, $startIndex=0) { |
|
88 | 88 | $this->startIndex=$startIndex; |
89 | 89 | $params=$dispatcher->getParams(); |
90 | 90 | $action=$dispatcher->getActionName(); |
91 | 91 | $items=array($dispatcher->getControllerName()); |
92 | - if(\sizeof($params)>0 || \strtolower($action)!="index" ){ |
|
92 | + if (\sizeof($params)>0 || \strtolower($action)!="index") { |
|
93 | 93 | $items[]=$action; |
94 | - foreach ($params as $p){ |
|
95 | - if(\is_object($p)===false) |
|
94 | + foreach ($params as $p) { |
|
95 | + if (\is_object($p)===false) |
|
96 | 96 | $items[]=$p; |
97 | 97 | } |
98 | 98 | } |
@@ -105,14 +105,14 @@ discard block |
||
105 | 105 | * @param string $separator |
106 | 106 | * @return string |
107 | 107 | */ |
108 | - public function getHref($index=null,$separator="/"){ |
|
109 | - if(!isset($index)){ |
|
108 | + public function getHref($index=null, $separator="/") { |
|
109 | + if (!isset($index)) { |
|
110 | 110 | $index=sizeof($this->content); |
111 | 111 | } |
112 | - if($this->absolutePaths===true){ |
|
112 | + if ($this->absolutePaths===true) { |
|
113 | 113 | return $this->_hrefFunction($this->content[$index]); |
114 | - }else{ |
|
115 | - return $this->root.implode($separator, array_slice(array_map(function($e){return $this->_hrefFunction($e);}, $this->content),$this->startIndex,$index+1)); |
|
114 | + }else { |
|
115 | + return $this->root.implode($separator, array_slice(array_map(function($e) {return $this->_hrefFunction($e); }, $this->content), $this->startIndex, $index+1)); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * @return \Ajax\bootstrap\html\HtmlBreadcrumbs |
123 | 123 | */ |
124 | 124 | public function setHrefFunction($_hrefFunction) { |
125 | - $this->_hrefFunction = $_hrefFunction; |
|
125 | + $this->_hrefFunction=$_hrefFunction; |
|
126 | 126 | return $this; |
127 | 127 | } |
128 | 128 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } |
133 | 133 | |
134 | 134 | public function setAutoActive($autoActive) { |
135 | - $this->autoActive = $autoActive; |
|
135 | + $this->autoActive=$autoActive; |
|
136 | 136 | return $this; |
137 | 137 | } |
138 | 138 | |
@@ -141,11 +141,11 @@ discard block |
||
141 | 141 | * @see \Ajax\bootstrap\html\BaseHtml::compile() |
142 | 142 | */ |
143 | 143 | public function compile(JsUtils $js=NULL, View $view=NULL) { |
144 | - if($this->autoActive){ |
|
144 | + if ($this->autoActive) { |
|
145 | 145 | $this->setActive(); |
146 | 146 | } |
147 | 147 | $count=$this->count(); |
148 | - for($i=1;$i<$count;$i++){ |
|
148 | + for ($i=1; $i<$count; $i++) { |
|
149 | 149 | $this->content[$i]->wrap($this->getContentDivider($i-1)); |
150 | 150 | } |
151 | 151 | return parent::compile($js, $view); |
@@ -156,16 +156,16 @@ discard block |
||
156 | 156 | * @see \Ajax\bootstrap\html\base\BaseHtml::on() |
157 | 157 | */ |
158 | 158 | public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) { |
159 | - foreach ($this->content as $element){ |
|
160 | - $element->on($event,$jsCode,$stopPropagation,$preventDefault); |
|
159 | + foreach ($this->content as $element) { |
|
160 | + $element->on($event, $jsCode, $stopPropagation, $preventDefault); |
|
161 | 161 | } |
162 | 162 | return $this; |
163 | 163 | } |
164 | 164 | |
165 | 165 | |
166 | 166 | public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) { |
167 | - foreach ($this->content as $element){ |
|
168 | - if($element->getProperty($this->attr)!=NULL) |
|
167 | + foreach ($this->content as $element) { |
|
168 | + if ($element->getProperty($this->attr)!=NULL) |
|
169 | 169 | $element->_ajaxOn($operation, $event, $url, $responseElement, $parameters); |
170 | 170 | } |
171 | 171 | return $this; |
@@ -177,35 +177,35 @@ discard block |
||
177 | 177 | */ |
178 | 178 | protected function createItem($value) { |
179 | 179 | $count=$this->count(); |
180 | - $itemO=new HtmlSemDoubleElement("item-".$this->identifier."-".$count,"a","section"); |
|
181 | - if(\is_array($value)) |
|
180 | + $itemO=new HtmlSemDoubleElement("item-".$this->identifier."-".$count, "a", "section"); |
|
181 | + if (\is_array($value)) |
|
182 | 182 | $itemO->fromArray($value); |
183 | - else{ |
|
183 | + else { |
|
184 | 184 | $itemO->setContent($value); |
185 | 185 | $itemO->setProperty($this->attr, $this->getHref($count)); |
186 | 186 | } |
187 | 187 | return $itemO; |
188 | 188 | } |
189 | 189 | |
190 | - public function addIcon($icon,$index){ |
|
190 | + public function addIcon($icon, $index) { |
|
191 | 191 | $item=$this->getItem($index); |
192 | - if(isset($item)){ |
|
192 | + if (isset($item)) { |
|
193 | 193 | $icon=new HtmlIcon("icon-".$this->identifier, $icon); |
194 | 194 | $item->wrapContent($icon); |
195 | 195 | } |
196 | 196 | } |
197 | 197 | |
198 | - public function addItem($item){ |
|
198 | + public function addItem($item) { |
|
199 | 199 | $itemO=parent::addItem($item); |
200 | 200 | $this->addToPropertyCtrl("class", "section", array("section")); |
201 | 201 | return $itemO; |
202 | 202 | } |
203 | 203 | |
204 | - public function asLinks(){ |
|
204 | + public function asLinks() { |
|
205 | 205 | $this->contentAs("a"); |
206 | 206 | } |
207 | 207 | |
208 | - public function asTexts(){ |
|
208 | + public function asTexts() { |
|
209 | 209 | $this->contentAs("div"); |
210 | 210 | } |
211 | 211 |