2024-08-30 12:27:46 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace kernel\widgets;
|
|
|
|
|
|
|
|
use kernel\models\Menu;
|
|
|
|
use kernel\Widget;
|
|
|
|
|
|
|
|
class MenuWidget extends Widget
|
|
|
|
{
|
|
|
|
|
|
|
|
public function run(): void
|
|
|
|
{
|
2024-09-24 14:57:25 +03:00
|
|
|
$menu = Menu::where("parent_id", 0)->get()->sortBy("priority");
|
2024-11-19 13:41:13 +03:00
|
|
|
$this->cgView->render('/menu.php', ['menu' => $menu]);
|
2024-08-30 12:27:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|