4ca21c3e
Alexey Boroda
first commit
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
namespace frontend\controllers;
use yii\web\Controller;
use common\modules\product\models\Category;
use yii\data\ActiveDataProvider;
use yii\web\NotFoundHttpException;
/**
* Article controller
*/
class NewCollectionsController extends Controller
{
/**
* Displays article list.
* @return string
*/
public function actionIndex()
{
$query = Category::find()
->where(['new_collection' => true]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
'pagination' => false,
]);
return $this->render('index', [
'dataProvider' => $dataProvider,
]);
}
}
|