PHP code example of asdoria / sylius-facet-filter-plugin
1. Go to this page and download the library: Download asdoria/sylius-facet-filter-plugin 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/ */
asdoria / sylius-facet-filter-plugin example snippets
Asdoria\SyliusFacetFilterPlugin\AsdoriaSyliusFacetFilterPlugin::class => ['all' => true],
[...]
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
// ...
use Asdoria\SyliusFacetFilterPlugin\Model\Aware\FacetFilterCodeAwareInterface;
use Asdoria\SyliusFacetFilterPlugin\Traits\FacetFilterCodeTrait;
use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\Taxon as BaseTaxon;
use Sylius\Component\Taxonomy\Model\TaxonTranslationInterface;
/**
* @ORM\Entity
* @ORM\Table(name="sylius_taxon")
*/
class Taxon extends BaseTaxon implements FacetFilterCodeAwareInterface
{
use FacetFilterCodeTrait;
protected function createTranslation(): TaxonTranslationInterface
{
return new TaxonTranslation();
}
}