Class.php
845 Bytes
<?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);
}
}