使用Symfony框架自身提供的后台生成器,对写后台来说,是很大的福音。它减缩了很多工作,让注意力放到了逻辑设计上。下面是主要流程:
- 建立后台程序/管理模块
- 创建生成后台程序的配置文件
- 增加登陆模块
* 建立后台程序/管理模块
> symfony init-app backend
> symfony propel-init-admin backend post Post
> symfony propel-init-admin backend comment Comment
注意:生成管理模块与创建一般模块不同,一般模块init-module,而管理模块propel-init-admin.
其实这个与脚手架的创建类似:
symfony propel-generate-crud frontend post Post
symfony propel-generate-crud frontend comment Comment
* 创建生成后台程序的配置文件
配置文件位置:/apps/backend/modules/moduleName/config/generator.yml
具体配置信息请参考 Symfony 权威指南14章。
* 增加登陆模块
> symfony init-module backend security
编辑apps/backend/modules/post/config/security.yml
all:
–is_secure: on
在文件apps/backend/modules/security/templates/indexSuccess.php中,增加登陆表单。
在文件apps/backend/modules/security/actions/actions.class.php中,增加login方法。
在文件apps/backend/config/settings.yml中,设置登陆模块:
all:
.actions:
login_module: security
login_action: index
That is All!
二月 6th, 2010 on 10:39 上午
Hello all,
How to get the best quality score on advertising on keywords like bad credit loans which are known as very expensinve keywords
on financial.
This will help a lot on my technics.
If someone has an ideea PM me for details
三月 4th, 2010 on 3:01 下午
huh. strange thread
)
四月 6th, 2010 on 9:47 上午
cool article.
tobe rouge