【问题标题】:Cake 3.x How do I trigger a bake template in another vendor?Cake 3.x 如何在其他供应商中触发烘焙模板?
【发布时间】:2016-03-02 12:21:21
【问题描述】:
  1. 蛋糕版本:3.1.2
  2. 粗略版本:4.2.0

vendor/cakephp/bake/src/Shell/Task里面有一个ControllerTask.php代码here

在vendor/cakephp/bake/src/Template/Bake/Controller里面有一个controller.ctp代码here

在vendor/friendsofcake/crud/src/Template/Bake/Controller里面,有一个controller.ctp代码here

我的问题是如何在不同的供应商中执行控制器烘焙模板,而无需按照http://book.cakephp.org/3.0/en/bake/development.html#creating-new-bake-command-options 的建议将代码复制并粘贴到我的 App/Template/Bake 中?

我希望能够为例如 bin/cake bake crud.controller users 做一些事情

这可能吗?

【问题讨论】:

    标签: php templates cakephp cakephp-bake


    【解决方案1】:

    这样做

    bin/cake bake controller users --theme Crud
    

    【讨论】:

      猜你喜欢
      • 2020-08-25
      • 2018-06-07
      • 1970-01-01
      • 1970-01-01
      • 2016-01-28
      • 2013-03-30
      • 2011-12-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多