Sylius\Bundle\TaxonomyBundle\Form\EventListener\BuildTaxonFormSubscriber::getFilterTaxonOption PHP Method

getFilterTaxonOption() private method

private getFilterTaxonOption ( Sylius\Component\Taxonomy\Model\TaxonInterface $taxon ) : callable | null
$taxon Sylius\Component\Taxonomy\Model\TaxonInterface
return callable | null
    private function getFilterTaxonOption(TaxonInterface $taxon)
    {
        if (null === $taxon->getId()) {
            return null;
        }
        return function (TaxonInterface $entry) use($taxon) {
            return $entry->getId() !== $taxon->getId();
        };
    }