Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function getTaxons($taxonomy = null)
 {
     if (null !== $taxonomy) {
         return $this->taxons->filter(function (BaseTaxonInterface $taxon) use($taxonomy) {
             return $taxonomy === strtolower($taxon->getTaxonomy()->getName());
         });
     }
     return $this->taxons;
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function getTaxons($rootTaxonCode = null)
 {
     if (null !== $rootTaxonCode) {
         return $this->taxons->filter(function (BaseTaxonInterface $taxon) use($rootTaxonCode) {
             return $rootTaxonCode === strtolower($taxon->getRoot()->getCode());
         });
     }
     return $this->taxons;
 }