PHP code example of printdeal / pandosearch-bundle
1. Go to this page and download the library: Download printdeal/pandosearch-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
printdeal / pandosearch-bundle example snippets
php
public function registerBundles()
{
$bundles = array(
// ...
new Printdeal\PandosearchBundle\PrintdealPandosearchBundle(),
// ...
);
...
}
php
// get search results
$searchCriteria = new SearchCriteria();
$searchCriteria->setQuery('searchString');
$this->get('printdeal_pandosearch')->search($searchCriteria);
// get search suggestions
$suggestCriteria = new SuggestCriteria();
$suggestCriteria->setQuery('searchString');
$this->get('printdeal_pandosearch')->suggest($suggestCriteria);