@@ -50,9 +50,9 @@ discard block |
||
| 50 | 50 | $item=$itemO; |
| 51 | 51 | } |
| 52 | 52 | $item=parent::addItem($item); |
| 53 | - if(!$item instanceof HtmlMenu) |
|
| 54 | - $item->addToPropertyCtrl("class", "item",array("item")); |
|
| 55 | - else{ |
|
| 53 | + if(!$item instanceof HtmlMenu) { |
|
| 54 | + $item->addToPropertyCtrl("class", "item",array("item")); |
|
| 55 | + } else{ |
|
| 56 | 56 | $this->setSecondary(); |
| 57 | 57 | } |
| 58 | 58 | } |
@@ -102,8 +102,9 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | public function asTab($vertical=false){ |
| 104 | 104 | $this->apply(function(HtmlDoubleElement &$item){$item->setTagName("a");}); |
| 105 | - if($vertical===true) |
|
| 106 | - $this->setVertical(); |
|
| 105 | + if($vertical===true) { |
|
| 106 | + $this->setVertical(); |
|
| 107 | + } |
|
| 107 | 108 | return $this->addToProperty("class", "tabular"); |
| 108 | 109 | } |
| 109 | 110 | |
@@ -129,9 +130,10 @@ discard block |
||
| 129 | 130 | */ |
| 130 | 131 | public function fromDatabaseObject($object, $function) { |
| 131 | 132 | $return=$function($object); |
| 132 | - if(\is_array($return)) |
|
| 133 | - $this->addItems($return); |
|
| 134 | - else |
|
| 135 | - $this->addItem($return); |
|
| 133 | + if(\is_array($return)) { |
|
| 134 | + $this->addItems($return); |
|
| 135 | + } else { |
|
| 136 | + $this->addItem($return); |
|
| 137 | + } |
|
| 136 | 138 | } |
| 137 | 139 | } |
| 138 | 140 | \ No newline at end of file |
@@ -91,8 +91,9 @@ discard block |
||
| 91 | 91 | if(\sizeof($params)>0 || \strtolower($action)!="index" ){ |
| 92 | 92 | $items[]=$action; |
| 93 | 93 | foreach ($params as $p){ |
| 94 | - if(\is_object($p)===false) |
|
| 95 | - $items[]=$p; |
|
| 94 | + if(\is_object($p)===false) { |
|
| 95 | + $items[]=$p; |
|
| 96 | + } |
|
| 96 | 97 | } |
| 97 | 98 | } |
| 98 | 99 | return $this->addItems($items); |
@@ -110,7 +111,7 @@ discard block |
||
| 110 | 111 | } |
| 111 | 112 | if($this->absolutePaths===true){ |
| 112 | 113 | return $this->_hrefFunction($this->content[$index]); |
| 113 | - }else{ |
|
| 114 | + } else{ |
|
| 114 | 115 | return $this->root.implode($separator, array_slice(array_map(function($e){return $this->_hrefFunction($e);}, $this->content),$this->startIndex,$index+1)); |
| 115 | 116 | } |
| 116 | 117 | } |
@@ -176,9 +177,9 @@ discard block |
||
| 176 | 177 | protected function createItem($value) { |
| 177 | 178 | $count=$this->count(); |
| 178 | 179 | $itemO=new HtmlSemDoubleElement("item-".$this->identifier."-".$count,"a","section"); |
| 179 | - if(\is_array($value)) |
|
| 180 | - $itemO->fromArray($value); |
|
| 181 | - else{ |
|
| 180 | + if(\is_array($value)) { |
|
| 181 | + $itemO->fromArray($value); |
|
| 182 | + } else{ |
|
| 182 | 183 | $itemO->setContent($value); |
| 183 | 184 | $itemO->setProperty($this->attr, $this->getHref($count)); |
| 184 | 185 | } |