Skip to content

Commit

Permalink
fix bug from widget
Browse files Browse the repository at this point in the history
  • Loading branch information
kriptograf committed Mar 1, 2019
1 parent 87c5a9d commit bfec270
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion widgets/MenuWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ class MenuWidget extends Widget
*/
public $cssClass = '';

/**
* Html options for LI tags
*/
public $liOptions = [];

/**
* Html options for LI tags from sub items
*/
public $liChildsOptions = [];

public function init()
{
parent::init();
Expand All @@ -47,7 +57,7 @@ public function run()
/**
* Get menu items
*/
$data = MenuItem::getItems($menu->id);
$data = MenuItem::getItems($menu->id, $this->liOptions, $this->liChildsOptions);

return $this->render('index', [
'data'=>$data,
Expand Down

0 comments on commit bfec270

Please sign in to comment.