MicroFrameWork/kernel/widgets/MenuWidget.php
2024-11-19 13:41:13 +03:00

17 lines
294 B
PHP

<?php
namespace kernel\widgets;
use kernel\models\Menu;
use kernel\Widget;
class MenuWidget extends Widget
{
public function run(): void
{
$menu = Menu::where("parent_id", 0)->get()->sortBy("priority");
$this->cgView->render('/menu.php', ['menu' => $menu]);
}
}