Exemplo n.º 1
0
 /**
  * Displays menu page.
  *
  * @return mixed
  */
 public function actionMenu()
 {
     $model = new Menu();
     // wywołuję funkcję tworzącą HTMLowy kod i zwracającą go
     $content = $model->showMenu();
     // przekazuję ten kod do wyświetlenia w widoku
     return $this->render('menu', array('content' => $content));
 }
Exemplo n.º 2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Menu::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'pid' => $this->pid, 'sort' => $this->sort, 'hide' => $this->hide, 'status' => $this->status]);
     $query->andFilterWhere(['like', 'title', $this->title])->andFilterWhere(['like', 'url', $this->url])->andFilterWhere(['like', 'tip', $this->tip])->andFilterWhere(['like', 'group', $this->group]);
     return $dataProvider;
 }
Exemplo n.º 3
0
    ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php 
}
?>
    </div>

    <div id="gkMiddleNav2" class="gkWrap">
        <ul class="menu">
            <?php 
foreach (Menu::findByAlias('top-menu-3')->items as $menuItem) {
    echo Html::tag('li', Html::a($menuItem->name, $menuItem->link));
}
?>
        </ul>
    </div>

    <div id="gkBottom2" class="gkWrap">
        <?php 
foreach ($secondRowCategories as $category) {
    ?>
            <div class="gkCol gkColRight">
                <div class="box nsp blue color_title small">
                    <div>
                        <h3 class="header">
                            <span><?php 
Exemplo n.º 4
0
echo $this->render('_rightMenu');
?>
                    </div>
                </div>
            </div>
        </div>
        <?php 
echo $this->render('_bottomMenu');
?>
        <div id="gkFooter" class="gkWrap">
            <div id="gkFooterWrap">
                <div id="gkCopyrights">
                    <div id="gkFooterNav">
                        <ul class="menu">
                            <?php 
foreach (Menu::findByAlias('nizhnee-menyu')->items as $menuItem) {
    echo Html::tag('li', Html::a($menuItem->name, $menuItem->link));
}
?>
                        </ul>
                    </div>
                    <div>
                        Конфликты и законы © 2008-<?php 
echo date('Y');
?>
.<br>
                        <p style="line-height: 13px;"><?php 
echo \frontend\helpers\ConfigurationHelper::getValue('btmText');
?>
</p>
                    </div>
Exemplo n.º 5
0
 /**
  * Finds the Menu model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Menu the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Menu::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Exemplo n.º 6
0
  <body>
  <?php 
echo $this->beginBody();
?>

    <div class="blog-masthead">
      <div class="container">
        <nav class="blog-nav">
         <!--  <a class="blog-nav-item active" href="#">Home</a>
          <a class="blog-nav-item" href="#">New features</a>
          <a class="blog-nav-item" href="#">Press</a>
          <a class="blog-nav-item" href="#">New hires</a>
          <a class="blog-nav-item" href="#">About</a> -->
          <?php 
$menus = \frontend\models\Menu::find()->orderBy('_order')->all();
foreach ($menus as $k => $v) {
    ?>
            <a class="blog-nav-item" href="<?php 
    echo $v['url'];
    ?>
"><?php 
    echo $v['title'];
    ?>
</a>
          <?php 
}
?>
        </nav>
      </div>
    </div>