Development

sfSearchPlugin/Chapter4

You must first sign up to be able to contribute.

Version 5 (modified by Carl.Vondrick, 9 years ago)
--

Generating an Interface

In Chapter 3 we learned how to use our search index to display results to the user. But, sfSearch ships with a generator that can construct an entire search interface from a configuration file, just like symfony's CRUD and admin generators.

Creating Generator Skeleton

To create the generator skeleton in the application "frontend", the module "search", and for the index "SiteSearch?", we run:

./symfony search:init-interface frontend search SiteSearch

Be sure to replace the arguments with the information specific to your project.

This command will construct a skeleton module in apps/frontend/modules/search and place the generator configuration file in apps/frontend/modules/search/config/generator.yml . Like the admin generator, we modify thegenerator configuration to tailor the generated interface to our application requirements.

Under Construction

Coming Soon... I promise!

Return to Chapter 3