Initial import

This commit is contained in:
Admin Nasledstvo
2026-05-01 20:52:04 +03:00
commit ac168868ee
10028 changed files with 2337954 additions and 0 deletions
@@ -0,0 +1,34 @@
<?php
namespace app\widgets;
use app\models\Navigation;
class Footer extends _Base
{
public function run()
{
return $this->render('footer', [
'footer_navigation' => $this->retrieveNavigation('footer'),
'footer_2_navigation' => $this->retrieveNavigation('footer_2'),
'footer_3_navigation' => $this->retrieveNavigation('footer_3'),
]);
}
private function retrieveNavigation($menu_type)
{
//return [];
$nav = Navigation::find()
->where(['is_active' => 1])
->andWhere(['IN', 'menu_type', ['footer', 'footer_2', 'footer_3']])
->orderBy(['order_index' => SORT_ASC])->all();
$navigation = [];
foreach ($nav as $item) {
$navigation[$item->menu_type][] = $item;
}
return $navigation[$menu_type] ?? [];
}
}