final class TaxableType in Commerce Core 8.2
Provides taxable types.
Hierarchy
- class \Drupal\commerce_tax\TaxableType
Expanded class hierarchy of TaxableType
5 files declare their use of TaxableType
- CanadianSalesTaxTest.php in modules/
tax/ tests/ src/ Kernel/ Plugin/ Commerce/ TaxType/ CanadianSalesTaxTest.php - commerce_tax.module in modules/
tax/ commerce_tax.module - Provides tax functionality.
- EuropeanUnionVat.php in modules/
tax/ src/ Plugin/ Commerce/ TaxType/ EuropeanUnionVat.php - EuropeanUnionVatTest.php in modules/
tax/ tests/ src/ Kernel/ Plugin/ Commerce/ TaxType/ EuropeanUnionVatTest.php - TaxTypeBase.php in modules/
tax/ src/ Plugin/ Commerce/ TaxType/ TaxTypeBase.php
File
- modules/
tax/ src/ TaxableType.php, line 8
Namespace
Drupal\commerce_taxView source
final class TaxableType {
const PHYSICAL_GOODS = 'physical_goods';
const DIGITAL_GOODS = 'digital_goods';
const SERVICES = 'services';
const EVENTS = 'events';
/**
* Gets the labels.
*
* @return array
* An array of labels keyed by taxable type.
*/
public static function getLabels() {
return [
self::PHYSICAL_GOODS => t('Physical goods'),
self::DIGITAL_GOODS => t('Digital goods'),
self::SERVICES => t('Services'),
self::EVENTS => t('Events'),
];
}
/**
* Gets the default value.
*
* @return string
* The default value.
*/
public static function getDefault() {
return self::PHYSICAL_GOODS;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TaxableType:: |
constant | |||
TaxableType:: |
constant | |||
TaxableType:: |
public static | function | Gets the default value. | |
TaxableType:: |
public static | function | Gets the labels. | |
TaxableType:: |
constant | |||
TaxableType:: |
constant |