@@ -134,8 +134,8 @@ discard block |
||
| 134 | 134 | * @param string|array $params |
| 135 | 135 | * @return Modal |
| 136 | 136 | */ |
| 137 | - public function modal($attachTo=NULL, $params=NULL,$paramsParts=NULL) { |
|
| 138 | - $result= $this->addComponent(new Modal($this->js), $attachTo, $params); |
|
| 137 | + public function modal($attachTo=NULL, $params=NULL, $paramsParts=NULL) { |
|
| 138 | + $result=$this->addComponent(new Modal($this->js), $attachTo, $params); |
|
| 139 | 139 | $result->setParamParts($paramsParts); |
| 140 | 140 | return $result; |
| 141 | 141 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * @return Tab |
| 147 | 147 | */ |
| 148 | 148 | public function tab($attachTo=NULL, $params=NULL) { |
| 149 | - $result= $this->addComponent(new Tab($this->js), $attachTo, $params); |
|
| 149 | + $result=$this->addComponent(new Tab($this->js), $attachTo, $params); |
|
| 150 | 150 | return $result; |
| 151 | 151 | } |
| 152 | 152 | |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * @return Shape |
| 157 | 157 | */ |
| 158 | 158 | public function shape($attachTo=NULL, $params=NULL) { |
| 159 | - $result= $this->addComponent(new Shape($this->js), $attachTo, $params); |
|
| 159 | + $result=$this->addComponent(new Shape($this->js), $attachTo, $params); |
|
| 160 | 160 | return $result; |
| 161 | 161 | } |
| 162 | 162 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | * @return Form |
| 167 | 167 | */ |
| 168 | 168 | public function form($attachTo=NULL, $params=NULL) { |
| 169 | - $result= $this->addComponent(new Form($this->js), $attachTo, $params); |
|
| 169 | + $result=$this->addComponent(new Form($this->js), $attachTo, $params); |
|
| 170 | 170 | return $result; |
| 171 | 171 | } |
| 172 | 172 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * @return Toast |
| 177 | 177 | */ |
| 178 | 178 | public function toast($attachTo=NULL, $params=NULL) { |
| 179 | - $result= $this->addComponent(new Toast($this->js), $attachTo, $params); |
|
| 179 | + $result=$this->addComponent(new Toast($this->js), $attachTo, $params); |
|
| 180 | 180 | return $result; |
| 181 | 181 | } |
| 182 | 182 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | * @return Slider |
| 187 | 187 | */ |
| 188 | 188 | public function slider($attachTo=NULL, $params=NULL) { |
| 189 | - $result= $this->addComponent(new Slider($this->js), $attachTo, $params); |
|
| 189 | + $result=$this->addComponent(new Slider($this->js), $attachTo, $params); |
|
| 190 | 190 | return $result; |
| 191 | 191 | } |
| 192 | 192 | |
@@ -18,14 +18,14 @@ discard block |
||
| 18 | 18 | protected $_paramParts=array(); |
| 19 | 19 | |
| 20 | 20 | public function __construct($identifier, $content='') { |
| 21 | - parent::__construct($identifier, 'div','ui toast'); |
|
| 22 | - if(isset($content)){ |
|
| 21 | + parent::__construct($identifier, 'div', 'ui toast'); |
|
| 22 | + if (isset($content)) { |
|
| 23 | 23 | $this->setContent($content); |
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function setContent($value) { |
| 28 | - $this->content['content']=new HtmlSemDoubleElement('content-' . $this->identifier, 'div', 'content', $value); |
|
| 28 | + $this->content['content']=new HtmlSemDoubleElement('content-'.$this->identifier, 'div', 'content', $value); |
|
| 29 | 29 | return $this; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile() |
| 37 | 37 | */ |
| 38 | 38 | public function compile(JsUtils $js=NULL, &$view=NULL) { |
| 39 | - $this->content=JArray::sortAssociative($this->content, ['content','actions' ]); |
|
| 39 | + $this->content=JArray::sortAssociative($this->content, ['content', 'actions']); |
|
| 40 | 40 | return parent::compile($js, $view); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -45,8 +45,8 @@ discard block |
||
| 45 | 45 | * @see BaseHtml::run() |
| 46 | 46 | */ |
| 47 | 47 | public function run(JsUtils $js) { |
| 48 | - if(isset($this->_bsComponent)===false){ |
|
| 49 | - $this->_bsComponent=$js->semantic()->toast('#'.$this->identifier,$this->_params,$this->_paramParts); |
|
| 48 | + if (isset($this->_bsComponent)===false) { |
|
| 49 | + $this->_bsComponent=$js->semantic()->toast('#'.$this->identifier, $this->_params, $this->_paramParts); |
|
| 50 | 50 | } |
| 51 | 51 | $this->addEventsOnRun($js); |
| 52 | 52 | return $this->_bsComponent; |
@@ -5,5 +5,5 @@ |
||
| 5 | 5 | use Ajax\common\BaseEnum; |
| 6 | 6 | |
| 7 | 7 | abstract class People extends BaseEnum { |
| 8 | - const ADULT='adult',ALIEN='alien',ANGEL='angel',ANGRY='angry',ANGUISHED='anguished',ASTONISHED='astonished',ATHLETIC_SHOE='athletic_shoe',BABY='baby',BALD='bald',BALLET_SHOES='ballet_shoes'; |
|
| 8 | + const ADULT='adult', ALIEN='alien', ANGEL='angel', ANGRY='angry', ANGUISHED='anguished', ASTONISHED='astonished', ATHLETIC_SHOE='athletic_shoe', BABY='baby', BALD='bald', BALLET_SHOES='ballet_shoes'; |
|
| 9 | 9 | } |
@@ -5,6 +5,6 @@ |
||
| 5 | 5 | use Ajax\common\BaseEnum; |
| 6 | 6 | |
| 7 | 7 | abstract class Nature extends BaseEnum { |
| 8 | - const ANT='ant',BABY_CHICK='baby_chick',BADGER='badger',BANBOO='banboo',BAT='bat',BEAR='bear',BEE='bee',BEETLE='beetle',BIRD='bird',BLOSSOM='blossom',BLOWFISH='blowfish',BOAR='boar',BOOM='boom',BOUQUET='bouquet',BUG='bug', |
|
| 9 | - BUTTERFLY='butterfly',CACTUS='cactus',CAMEL='camel',CAT2='cat2',CAT='cat',CHERRY_BLOSSOM='cherry_blossom',CHICKEN='chicken',CHIPMUNK='chipmunk',CHRISTMAS_TREE='christmas_tree',CLOUD='cloud'; |
|
| 8 | + const ANT='ant', BABY_CHICK='baby_chick', BADGER='badger', BANBOO='banboo', BAT='bat', BEAR='bear', BEE='bee', BEETLE='beetle', BIRD='bird', BLOSSOM='blossom', BLOWFISH='blowfish', BOAR='boar', BOOM='boom', BOUQUET='bouquet', BUG='bug', |
|
| 9 | + BUTTERFLY='butterfly', CACTUS='cactus', CAMEL='camel', CAT2='cat2', CAT='cat', CHERRY_BLOSSOM='cherry_blossom', CHICKEN='chicken', CHIPMUNK='chipmunk', CHRISTMAS_TREE='christmas_tree', CLOUD='cloud'; |
|
| 10 | 10 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | if (isset($label)) |
| 37 | 37 | $this->setLabel($label); |
| 38 | - foreach ( $fields as $field ) { |
|
| 38 | + foreach ($fields as $field) { |
|
| 39 | 39 | $this->addItem($field); |
| 40 | 40 | } |
| 41 | 41 | return $this; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | public function addItem($item) { |
| 59 | 59 | $item=parent::addItem($item); |
| 60 | - if($item instanceof HtmlFormField) |
|
| 60 | + if ($item instanceof HtmlFormField) |
|
| 61 | 61 | $item->setContainer($this); |
| 62 | 62 | return $item; |
| 63 | 63 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | /** |
| 66 | 66 | * @return HtmlFormField |
| 67 | 67 | */ |
| 68 | - public function getItem($index){ |
|
| 68 | + public function getItem($index) { |
|
| 69 | 69 | return parent::getItem($index); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -104,10 +104,10 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | |
| 107 | - public static function radios($identifier,$name, $items=array(), $label=NULL, $value=null, $type=NULL) { |
|
| 108 | - $fields=array (); |
|
| 107 | + public static function radios($identifier, $name, $items=array(), $label=NULL, $value=null, $type=NULL) { |
|
| 108 | + $fields=array(); |
|
| 109 | 109 | $i=0; |
| 110 | - foreach ( $items as $val => $caption ) { |
|
| 110 | + foreach ($items as $val => $caption) { |
|
| 111 | 111 | $itemO=new HtmlFormRadio($name."-".$i++, $name, $caption, $val, $type); |
| 112 | 112 | if ($val===$value) { |
| 113 | 113 | $itemO->getDataField()->setProperty("checked", ""); |
@@ -115,19 +115,19 @@ discard block |
||
| 115 | 115 | $fields[]=$itemO; |
| 116 | 116 | } |
| 117 | 117 | $radios=new HtmlFormFields($identifier, $fields); |
| 118 | - if (isset($label)){ |
|
| 118 | + if (isset($label)) { |
|
| 119 | 119 | $lbl=$radios->setLabel($label); |
| 120 | - if($lbl instanceof HtmlSemDoubleElement){ |
|
| 120 | + if ($lbl instanceof HtmlSemDoubleElement) { |
|
| 121 | 121 | $lbl->setProperty("for", $name); |
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | return $radios; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - public static function checkeds($identifier,$name, $items=array(), $label=NULL, $values=array(), $type=NULL) { |
|
| 128 | - $fields=array (); |
|
| 127 | + public static function checkeds($identifier, $name, $items=array(), $label=NULL, $values=array(), $type=NULL) { |
|
| 128 | + $fields=array(); |
|
| 129 | 129 | $i=0; |
| 130 | - foreach ( $items as $val => $caption ) { |
|
| 130 | + foreach ($items as $val => $caption) { |
|
| 131 | 131 | $itemO=new HtmlFormCheckbox($name."-".$i++, $caption, $val, $type); |
| 132 | 132 | $itemO->setName($name); |
| 133 | 133 | if (\array_search($val, $values)!==false) { |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | return $this; |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | - public function run(JsUtils $js){ |
|
| 149 | + public function run(JsUtils $js) { |
|
| 150 | 150 | return parent::run($js); |
| 151 | 151 | //return $result->setItemSelector("[data-value]"); |
| 152 | 152 | } |
@@ -29,12 +29,14 @@ discard block |
||
| 29 | 29 | if (\is_string($end)) { |
| 30 | 30 | $label=$end; |
| 31 | 31 | \array_pop($fields); |
| 32 | - } else |
|
| 33 | - $label=NULL; |
|
| 32 | + } else { |
|
| 33 | + $label=NULL; |
|
| 34 | + } |
|
| 34 | 35 | } |
| 35 | 36 | } |
| 36 | - if (isset($label)) |
|
| 37 | - $this->setLabel($label); |
|
| 37 | + if (isset($label)) { |
|
| 38 | + $this->setLabel($label); |
|
| 39 | + } |
|
| 38 | 40 | foreach ( $fields as $field ) { |
| 39 | 41 | $this->addItem($field); |
| 40 | 42 | } |
@@ -57,8 +59,9 @@ discard block |
||
| 57 | 59 | |
| 58 | 60 | public function addItem($item) { |
| 59 | 61 | $item=parent::addItem($item); |
| 60 | - if($item instanceof HtmlFormField) |
|
| 61 | - $item->setContainer($this); |
|
| 62 | + if($item instanceof HtmlFormField) { |
|
| 63 | + $item->setContainer($this); |
|
| 64 | + } |
|
| 62 | 65 | return $item; |
| 63 | 66 | } |
| 64 | 67 | |
@@ -73,8 +76,9 @@ discard block |
||
| 73 | 76 | if ($this->_equalWidth) { |
| 74 | 77 | $count=$this->count(); |
| 75 | 78 | $this->addToProperty("class", Wide::getConstants()["W".$count]." fields"); |
| 76 | - } else |
|
| 77 | - $this->addToProperty("class", "fields"); |
|
| 79 | + } else { |
|
| 80 | + $this->addToProperty("class", "fields"); |
|
| 81 | + } |
|
| 78 | 82 | return parent::compile($js, $view); |
| 79 | 83 | } |
| 80 | 84 | |
@@ -136,8 +140,9 @@ discard block |
||
| 136 | 140 | $fields[]=$itemO; |
| 137 | 141 | } |
| 138 | 142 | $radios=new HtmlFormFields($identifier, $fields); |
| 139 | - if (isset($label)) |
|
| 140 | - $radios->setLabel($label)->setProperty("for", $name); |
|
| 143 | + if (isset($label)) { |
|
| 144 | + $radios->setLabel($label)->setProperty("for", $name); |
|
| 145 | + } |
|
| 141 | 146 | return $radios; |
| 142 | 147 | } |
| 143 | 148 | |
@@ -17,21 +17,21 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | protected $_paramParts=array(); |
| 19 | 19 | public function __construct($identifier, $content='') { |
| 20 | - parent::__construct($identifier, 'div','ui slider'); |
|
| 20 | + parent::__construct($identifier, 'div', 'ui slider'); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - public function setLabeled(){ |
|
| 23 | + public function setLabeled() { |
|
| 24 | 24 | return $this->addClass('labeled'); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - public function setTicked(){ |
|
| 28 | - if(!$this->propertyContains('class', 'labeled')){ |
|
| 27 | + public function setTicked() { |
|
| 28 | + if (!$this->propertyContains('class', 'labeled')) { |
|
| 29 | 29 | $this->addClass('labeled'); |
| 30 | 30 | } |
| 31 | 31 | return $this->addClass('ticked'); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - public function setLabels($labels){ |
|
| 34 | + public function setLabels($labels) { |
|
| 35 | 35 | $this->_params['interpretLabel']=$labels; |
| 36 | 36 | return $this; |
| 37 | 37 | } |
@@ -40,10 +40,10 @@ discard block |
||
| 40 | 40 | * $values is an associative array with keys (min,max,start,end,step,smooth) |
| 41 | 41 | * @param array $values |
| 42 | 42 | */ |
| 43 | - public function asRange($values=NULL){ |
|
| 43 | + public function asRange($values=NULL) { |
|
| 44 | 44 | $this->addClass('range'); |
| 45 | - if(\is_array($values)){ |
|
| 46 | - $this->_params=\array_merge($this->_params,$values); |
|
| 45 | + if (\is_array($values)) { |
|
| 46 | + $this->_params=\array_merge($this->_params, $values); |
|
| 47 | 47 | } |
| 48 | 48 | return $this; |
| 49 | 49 | } |
@@ -52,22 +52,22 @@ discard block |
||
| 52 | 52 | * $values is an associative array with keys (min,max,start,step,smooth) |
| 53 | 53 | * @param array $values |
| 54 | 54 | */ |
| 55 | - public function setValues($values=NULL){ |
|
| 56 | - if(\is_array($values)){ |
|
| 57 | - $this->_params=\array_merge($this->_params,$values); |
|
| 55 | + public function setValues($values=NULL) { |
|
| 56 | + if (\is_array($values)) { |
|
| 57 | + $this->_params=\array_merge($this->_params, $values); |
|
| 58 | 58 | } |
| 59 | 59 | return $this; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - public function setReversed($value=true){ |
|
| 63 | - if($value){ |
|
| 62 | + public function setReversed($value=true) { |
|
| 63 | + if ($value) { |
|
| 64 | 64 | $this->addClass('reversed'); |
| 65 | 65 | } |
| 66 | 66 | return $this; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - public function setVertical($value=true){ |
|
| 70 | - if($value){ |
|
| 69 | + public function setVertical($value=true) { |
|
| 70 | + if ($value) { |
|
| 71 | 71 | $this->addClass('vertical'); |
| 72 | 72 | } |
| 73 | 73 | return $this; |
@@ -78,8 +78,8 @@ discard block |
||
| 78 | 78 | * @see BaseHtml::run() |
| 79 | 79 | */ |
| 80 | 80 | public function run(JsUtils $js) { |
| 81 | - if(isset($this->_bsComponent)===false){ |
|
| 82 | - $this->_bsComponent=$js->semantic()->slider('#'.$this->identifier,$this->_params,$this->_paramParts); |
|
| 81 | + if (isset($this->_bsComponent)===false) { |
|
| 82 | + $this->_bsComponent=$js->semantic()->slider('#'.$this->identifier, $this->_params, $this->_paramParts); |
|
| 83 | 83 | } |
| 84 | 84 | $this->addEventsOnRun($js); |
| 85 | 85 | return $this->_bsComponent; |
@@ -19,56 +19,56 @@ |
||
| 19 | 19 | $this->uiName='toast'; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - public function close(){ |
|
| 22 | + public function close() { |
|
| 23 | 23 | return $this->addBehavior('close'); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - public function setClass($value){ |
|
| 26 | + public function setClass($value) { |
|
| 27 | 27 | $this->params['class']=$value; |
| 28 | 28 | return $this; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - public function setCloseIcon(){ |
|
| 31 | + public function setCloseIcon() { |
|
| 32 | 32 | $this->params['closeIcon']=true; |
| 33 | 33 | return $this; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - public function setShowIcon($value=false){ |
|
| 36 | + public function setShowIcon($value=false) { |
|
| 37 | 37 | $this->params['showIcon']=$value; |
| 38 | 38 | return $this; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - public function setCloseOnClick($value){ |
|
| 41 | + public function setCloseOnClick($value) { |
|
| 42 | 42 | $this->params['closeOnClick']=$value; |
| 43 | 43 | return $this; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - public function setTitle($title){ |
|
| 46 | + public function setTitle($title) { |
|
| 47 | 47 | $this->params['title']=$title; |
| 48 | 48 | return $this; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - public function setMessage($message){ |
|
| 51 | + public function setMessage($message) { |
|
| 52 | 52 | $this->params['message']=$message; |
| 53 | 53 | return $this; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - public function setPosition($position){ |
|
| 56 | + public function setPosition($position) { |
|
| 57 | 57 | $this->params['position']=$position; |
| 58 | 58 | return $this; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - public function setDisplayTime($time){ |
|
| 61 | + public function setDisplayTime($time) { |
|
| 62 | 62 | $this->params['displayTime']=$time; |
| 63 | 63 | return $this; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - public function setShowProgress($value='top'){ |
|
| 66 | + public function setShowProgress($value='top') { |
|
| 67 | 67 | $this->params['showProgress']=$value; |
| 68 | 68 | return $this; |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - public function setClassProgress($value){ |
|
| 71 | + public function setClassProgress($value) { |
|
| 72 | 72 | $this->params['classProgress']=$value; |
| 73 | 73 | return $this; |
| 74 | 74 | } |
@@ -54,22 +54,22 @@ |
||
| 54 | 54 | * @param string $target |
| 55 | 55 | * @return HtmlEmoji |
| 56 | 56 | */ |
| 57 | - public function asLink($href=NULL,$target=NULL) { |
|
| 57 | + public function asLink($href=NULL, $target=NULL) { |
|
| 58 | 58 | if (isset($href)) { |
| 59 | 59 | $_target=""; |
| 60 | - if(isset($target)) |
|
| 60 | + if (isset($target)) |
|
| 61 | 61 | $_target="target='{$target}'"; |
| 62 | - $this->wrap("<a href='" . $href . "' {$_target}>", "</a>"); |
|
| 62 | + $this->wrap("<a href='".$href."' {$_target}>", "</a>"); |
|
| 63 | 63 | } |
| 64 | 64 | return $this->addToProperty("class", "link"); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | public function addLabel($label, $before=false, $emoji=null) { |
| 68 | - if($before) |
|
| 68 | + if ($before) |
|
| 69 | 69 | $this->wrap($label); |
| 70 | 70 | else |
| 71 | 71 | $this->wrap("", $label); |
| 72 | - if($emoji!=null) |
|
| 72 | + if ($emoji!=null) |
|
| 73 | 73 | $this->setEmoji($emoji); |
| 74 | 74 | return $this; |
| 75 | 75 | } |
@@ -57,20 +57,23 @@ |
||
| 57 | 57 | public function asLink($href=NULL,$target=NULL) { |
| 58 | 58 | if (isset($href)) { |
| 59 | 59 | $_target=""; |
| 60 | - if(isset($target)) |
|
| 61 | - $_target="target='{$target}'"; |
|
| 60 | + if(isset($target)) { |
|
| 61 | + $_target="target='{$target}'"; |
|
| 62 | + } |
|
| 62 | 63 | $this->wrap("<a href='" . $href . "' {$_target}>", "</a>"); |
| 63 | 64 | } |
| 64 | 65 | return $this->addToProperty("class", "link"); |
| 65 | 66 | } |
| 66 | 67 | |
| 67 | 68 | public function addLabel($label, $before=false, $emoji=null) { |
| 68 | - if($before) |
|
| 69 | - $this->wrap($label); |
|
| 70 | - else |
|
| 71 | - $this->wrap("", $label); |
|
| 72 | - if($emoji!=null) |
|
| 73 | - $this->setEmoji($emoji); |
|
| 69 | + if($before) { |
|
| 70 | + $this->wrap($label); |
|
| 71 | + } else { |
|
| 72 | + $this->wrap("", $label); |
|
| 73 | + } |
|
| 74 | + if($emoji!=null) { |
|
| 75 | + $this->setEmoji($emoji); |
|
| 76 | + } |
|
| 74 | 77 | return $this; |
| 75 | 78 | } |
| 76 | 79 | |
@@ -8,23 +8,23 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | protected $image; |
| 10 | 10 | |
| 11 | - public function __construct($identifier, $content = NULL) { |
|
| 11 | + public function __construct($identifier, $content=NULL) { |
|
| 12 | 12 | parent::__construct($identifier, "item", $content); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | protected function initContent($content) { |
| 16 | 16 | if (\is_array($content)) { |
| 17 | - if (JArray::isAssociative($content) === false) { |
|
| 18 | - $icon = $content[0] ?? null; |
|
| 19 | - $title = $content[1] ?? null; |
|
| 20 | - $desc = $content[2] ?? null; |
|
| 17 | + if (JArray::isAssociative($content)===false) { |
|
| 18 | + $icon=$content[0] ?? null; |
|
| 19 | + $title=$content[1] ?? null; |
|
| 20 | + $desc=$content[2] ?? null; |
|
| 21 | 21 | } else { |
| 22 | - $icon = $content["icon"] ?? null; |
|
| 23 | - $image = $content["image"] ?? null; |
|
| 24 | - $title = $content["title"] ?? null; |
|
| 25 | - $header = $content["header"] ?? null; |
|
| 26 | - $desc = $content["description"] ?? null; |
|
| 27 | - $items = $content["items"] ?? null; |
|
| 22 | + $icon=$content["icon"] ?? null; |
|
| 23 | + $image=$content["image"] ?? null; |
|
| 24 | + $title=$content["title"] ?? null; |
|
| 25 | + $header=$content["header"] ?? null; |
|
| 26 | + $desc=$content["description"] ?? null; |
|
| 27 | + $items=$content["items"] ?? null; |
|
| 28 | 28 | } |
| 29 | 29 | if (isset($icon)) { |
| 30 | 30 | $this->setIcon($icon); |
@@ -45,12 +45,12 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - public function addList($items = array(), $ordered = false) { |
|
| 49 | - $list = new HtmlList("", $items); |
|
| 48 | + public function addList($items=array(), $ordered=false) { |
|
| 49 | + $list=new HtmlList("", $items); |
|
| 50 | 50 | if ($ordered) |
| 51 | 51 | $list->setOrdered(); |
| 52 | 52 | $list->setClass("list"); |
| 53 | - $this->content["list"] = $list; |
|
| 53 | + $this->content["list"]=$list; |
|
| 54 | 54 | return $list; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -47,8 +47,9 @@ |
||
| 47 | 47 | |
| 48 | 48 | public function addList($items = array(), $ordered = false) { |
| 49 | 49 | $list = new HtmlList("", $items); |
| 50 | - if ($ordered) |
|
| 51 | - $list->setOrdered(); |
|
| 50 | + if ($ordered) { |
|
| 51 | + $list->setOrdered(); |
|
| 52 | + } |
|
| 52 | 53 | $list->setClass("list"); |
| 53 | 54 | $this->content["list"] = $list; |
| 54 | 55 | return $list; |