The PhlexibleFrontendSearchBundle adds a generic search front end for elements that are index through the PhlexibleIndexerPageBundle.
- Download PhlexibleFrontendSearchBundle using composer
- Enable the Bundle
- Import PhlexibleFrontendSearchBundle routing
- Clear the symfony cache
Add PhlexibleFrontendSearchBundle by running the command:
$ php composer.phar require phlexible/frontend-search-bundle "~1.0.0"
Composer will install the bundle to your project's vendor/phlexible
directory.
Enable the bundle and the required WhiteOctoberPagerfantaBundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Phlexible\Bundle\FrontendSearchBundle\PhlexibleFrontendSearchBundle(),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
);
}
Import the PhlexibleFrontendSearchBundle routing.
# app/config/routing.yml
phlexible_frontendsearch_search:
resource: "@PhlexibleFrontendSearchBundle/Controller/SearchController.php"
type: annotation
If you access your phlexible application with environment prod, clear the cache:
$ php app/console cache:clear --env=prod