Class.php
832 Bytes
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
33
34
35
36
37
<?php
use Action\AbstractAction;
use Category\ClassModel;
use Plugin\Helpers;
/**
* 品类
*/
class ClassController extends AbstractAction
{
public function indexAction()
{
$channel = Helpers::getChannelByCookie();
$classes = ClassModel::getClassData();
// 根据频道设置默认的焦点
if (!empty($classes)) {
$classes[$channel - 1]['focus'] = true;
}
$this->setTitle('商品分类');
$this->setNavHeader('商品分类');
$data = array(
'categoryPage' => true,
'showDownloadApp' => true,
'category' => array(
'class' => $classes,
'searchUrl' => Helpers::url('/search', null, 'search'),
)
);
$this->_view->display('index', $data);
}
}