【问题标题】:Symfony, Doctrine Guard Plugin, generator.yml file, customizing by using another moduleSymfony,Doctrine Guard Plugin,generator.yml 文件,使用其他模块自定义
【发布时间】:2011-02-23 16:09:03
【问题描述】:

我正在使用 Symfony 1-4 和 sfDoctrineGuardPlugin。

我的问题是,在 Doctrine Guard 插件上,您知道每个模块都带有 generator.yml。我需要自定义generator.yml。例如,我需要显示另一个表的(模块)列。

// for example i am at X module and need to sort according to another table's/module's column ...

config:
list:
sort: [X, asc] // x is not on my module

与列表/显示相同。我需要显示一些不在我当前模块上的列...

我在网上找不到。非常感谢您分享您的想法和/或信息,erman。

【问题讨论】:

    标签: php symfony1 symfony-1.4 sfdoctrineguard


    【解决方案1】:
    1. 别介意直接在插件的目录中自定义任何文件。
    2. 通过将generator.yml 复制到应用程序的模块中来覆盖它。该模块必须与插件中的名称相同。见"Anatomy of a Plug-in"
    3. Symfony 不提供按当前模型中不存在的列对项目进行排序的内置功能。您必须通过在您的操作类中覆盖 addSortQuery 方法来手动执行此操作。请参阅“Symfony 1.4 admin generator sort on custom column”。

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-01-11
      • 1970-01-01
      • 1970-01-01
      • 2016-12-31
      • 2012-07-26
      • 1970-01-01
      • 2011-11-07
      相关资源
      最近更新 更多