控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

controller.stub 873B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace {%controllerNamespace%};
  3. use app\common\controller\Adminbase;
  4. /**
  5. * {%tableComment%}
  6. */
  7. class {%controllerName%} extends Adminbase
  8. {
  9. /**
  10. * {%modelName%}模型对象
  11. * @var \{%modelNamespace%}\{%modelName%}
  12. */
  13. protected $modelClass = null;
  14. protected function initialize()
  15. {
  16. parent::initialize();
  17. $this->modelClass = new \{%modelNamespace%}\{%modelName%};
  18. {%controllerAssignList%}
  19. }
  20. /**
  21. * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
  22. * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
  23. * 需要将application/admin/library/traits/Curd.php中对应的方法复制到当前控制器,然后进行修改
  24. */
  25. {%controllerIndex%}
  26. }