ExamCategoryController.class.php
919 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
38
39
40
41
<?php
/**
* 考试分类列表
* User: yingcai
* Date: 2017/10/12
* Time: 下午2:44
*/
namespace Apicp\Controller\Exam;
use Common\Common\ExamHelper;
class ExamCategoryController extends \Apicp\Controller\AbstractController
{
/**
* ExamCate
* @author houyingcai
* @desc 考试分类列表
* @return array
array(
'list' => array( // 列表数据
array(
'ca_id' => 1, // 分类ID
'ca_name' => '分类一', // 分类名称
),
),
)
*/
public function Index_post()
{
$exam_helper = &ExamHelper::instance();
$list = $exam_helper->exam_category_open_list();
foreach ($list as &$v) {
$v['ec_id'] = intval($v['ec_id']);
}
$this->_result = $list;
}
}