Symfony, Doctrine Guard Plugin, generator.yml file, customizing by using another module

点点圈 提交于 2019-12-13 05:13:34

问题


I am using Symfony 1-4 and sfDoctrineGuardPlugin.

My question is, on Doctrine Guard Plugin as you know each module came with generator.yml. And i need to customize generator.yml. For example, i need to display another table's (module's) column.

// 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

Same thing with list/display. I need to display some column which is not on my current module...

I couldn't find it on the web. Thanks a lot for sharing your idea and/or information, erman.


回答1:


  1. Never mind to customize any file directly in the plugin's dir.
  2. Override generator.yml by copying it into your application's module. The module must be the same name as in plugin. See "Anatomy of a Plug-in".
  3. Symfony does not provide a built-in functionality to sort items by columns that don't present in current model. You have to do it manually by overriding an addSortQuery method in your actions class. See "Symfony 1.4 admin generator sort on custom column".

Hope this would help.



来源:https://stackoverflow.com/questions/5093476/symfony-doctrine-guard-plugin-generator-yml-file-customizing-by-using-another

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!