本文整理汇总了PHP中Admin\Controller\AdminController::getCardType方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminController::getCardType方法的具体用法?PHP AdminController::getCardType怎么用?PHP AdminController::getCardType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin\Controller\AdminController
的用法示例。
在下文中一共展示了AdminController::getCardType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
/**
* 加载专业编辑页面
* @author Martin.Cheng <martin.cheng@gaodun.cn>
*/
public function edit()
{
$field = array();
$info = $this->MajorModel->getMajorinfo(I('get.id'), $field);
$type = AdminController::getCardType();
foreach ($type as $k => $v) {
$type_new['val'] = $k;
$type_new['text'] = $v;
if (intval($info['type_id']) == $k) {
$type_new['check'] = true;
} else {
$type_new['check'] = false;
}
$info['type'][] = $type_new;
}
$this->assign('info', $info);
$this->display();
}
示例2: eachdata
protected function eachdata($Resume_data)
{
foreach ($Resume_data as $k => $v) {
$Resume_data[$k]['education'] = AdminController::getDegreeArr2($Resume_data[$k]['education']);
$Resume_data[$k]['graduate_year'] = $Resume_data[$k]['graduate_year'] ? AdminController::getGradeArr($Resume_data[$k]['graduate_year']) : '';
$Resume_data[$k]['major_text'] = AdminController::getCardType($Resume_data[$k]['major_type']);
$Resume_data[$k]['view_uri'] = C('FRONT_URL') . '/Student/resume/role/2/id/' . (int) $v['pkid'];
if ($Resume_data[$k]['politics_status'] == 1) {
$Resume_data[$k]['politics_status'] = '党员';
} else {
$Resume_data[$k]['politics_status'] = '其他';
}
if ($Resume_data[$k]['gender'] == 1) {
$Resume_data[$k]['gender'] = '男';
} else {
$Resume_data[$k]['gender'] = '女';
}
}
return $Resume_data;
}