private function getTaxClasses($locale)
    {
        $itemManager = $this->get('sulu_sales_core.item_manager');
        /** @var TaxClass[] $taxClasses */
        $taxClasses = $this->get('sulu_product.tax_class_repository')->findAll();

        $result = [];

        foreach ($taxClasses as $taxClass) {
            $result[] = [
                'id' => $taxClass->getId(),
                'name' => $taxClass->getTranslation($locale)->getName(),
                'tax' => $itemManager->retrieveTaxForClass($taxClass)
            ];
        }

        return $result;
    }
private function getTaxClasses($locale)
    {
        $itemManager = $this->get('sulu_sales_core.item_manager');
        /** @var TaxClass[] $taxClasses */
        $taxClasses = $this->get('sulu_product.tax_class_repository')->findAll();

        $result = [];

        foreach ($taxClasses as $taxClass) {
            $result[] = [
                'id' => $taxClass->getId(),
                'name' => $taxClass->getTranslation($locale)->getName(),
                'tax' => $itemManager->retrieveTaxForClass($taxClass)
            ];
        }

        return $result;
    }
private function getTaxClasses ( $ locale ) { $ itemManager = $ this -> get ( 'sulu_sales_core.item_manager' ) ; /** @var TaxClass[] $taxClasses */ $ taxClasses = $ this -> get ( 'sulu_product.tax_class_repository' ) -> findAll ( ) ; $ result = [ ] ; foreach ( $ taxClasses as $ taxClass ) { $ result [ ] = [ 'id' => $ taxClass -> getId ( ) , 'name' => $ taxClass -> getTranslation ( $ locale ) -> getName ( ) , 'tax' => $ itemManager -> retrieveTaxForClass ( $ taxClass ) ] ; } return $ result ; }
Returns all tax classes.

@param string $locale

@return array
Returns all tax classes .