action button class

This commit is contained in:
2024-11-19 13:41:13 +03:00
parent 772ad48961
commit 0f47f73dda
10 changed files with 67 additions and 29 deletions

View File

@ -8,9 +8,9 @@ class ActionButtonWidget extends Widget
{
public function run(): void
{
$icon = $this->data['icon'];
$btn = $this->data['btn'];
$label = $this->data['label'];
$btn_type = $this->data['btn_type'];
$url = $this->data['url'];
$this->cgView->render('/admin/action_button.php', ['icon' => $icon, 'btn' => $btn, 'url' => $url]);
$this->cgView->render('/action_button.php', ['label' => $label, 'btn_type' => $btn_type, 'url' => $url]);
}
}

View File

@ -11,7 +11,7 @@ class MenuWidget extends Widget
public function run(): void
{
$menu = Menu::where("parent_id", 0)->get()->sortBy("priority");
$this->cgView->render('/admin/menu.php', ['menu' => $menu]);
$this->cgView->render('/menu.php', ['menu' => $menu]);
}
}

View File

@ -13,6 +13,6 @@ class ModuleTabsWidget extends Widget
'/admin' => 'Локальные',
'/admin/module_shop_client' => 'Каталог'
];
$this->cgView->render('/admin/module_tabs.php', ['tabs' => $tabs]);
$this->cgView->render('/module_tabs.php', ['tabs' => $tabs]);
}
}