Collection.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace app\admin\controller\teacher;
  3. use app\common\controller\Backend;
  4. use app\common\model\Config as ConfigModel;
  5. /**
  6. * sim-考试集合管理
  7. *
  8. * @icon fa fa-circle-o
  9. */
  10. class Collection extends Backend
  11. {
  12. /**
  13. * Collection模型对象
  14. * @var \app\admin\model\teacher\Collection
  15. */
  16. protected $model = null;
  17. protected $whereExtend = null;
  18. public function _initialize()
  19. {
  20. parent::_initialize();
  21. $this->model = new \app\admin\model\teacher\Collection;
  22. $this->assignConfig('sim_sim_type', ConfigModel::getSimTypeList());
  23. $this->assign('sim_sim_type', ConfigModel::getSimTypeList());
  24. $this->assignConfig('sim_question_setting_method', ConfigModel::getSimQuestionList());
  25. $this->assign('sim_question_setting_method', ConfigModel::getSimQuestionList());
  26. }
  27. /**
  28. * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
  29. * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
  30. * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
  31. */
  32. }