Symfony automatically generates background programs

Source: Internet
Author: User

Using the background generator provided by the symfony framework is a great boon for writing back-ends. It reduces a lot of work and enables attention to logical design. The main process is as follows:

 

 

  • Create a background program/Management Module
  • Create a configuration file for generating background programs
  • Add login module
* Create a background program/Management Module

> Symfony init-app backend
> Symfony propel-init-Admin backend post
> Symfony propel-init-Admin backend Comment comment

Note: The generation management module is different from the creation of general modules. The general module init-module, and the Management Module propel-init-Admin.
In fact, this is similar to the creation of scaffolding:
Symfony propel-generate-Crud frontend post
Symfony propel-generate-Crud frontend Comment comment

* Create a configuration file for generating background programs

Configuration File Location:/apps/backend/modules/modulename/config/generator. yml
For detailed configuration information, see Chapter 14 of symfony's authoritative guide.

* Added the login module.

> Symfony init-module backend Security
Edit apps/backend/modules/post/config/security. yml
ALL:
-Is_secure: On

Add the login form to the apps/backend/modules/security/templates/indexsuccess. php file.
Add the login Method to the apps/backend/modules/security/actions. Class. php file.
In the apps/backend/config/settings. yml file, set the login module:
ALL:
. Actions:
Login_module: Security
Login_action: Index

That is all!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.