interface TaxNumberTypeInterface in Commerce Core 8.2
Defines the base interface for tax number types.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\DerivativeInspectionInterface
- interface \Drupal\commerce_tax\Plugin\Commerce\TaxNumberType\TaxNumberTypeInterface
Expanded class hierarchy of TaxNumberTypeInterface
All classes that implement TaxNumberTypeInterface
File
- modules/
tax/ src/ Plugin/ Commerce/ TaxNumberType/ TaxNumberTypeInterface.php, line 11
Namespace
Drupal\commerce_tax\Plugin\Commerce\TaxNumberTypeView source
interface TaxNumberTypeInterface extends PluginInspectionInterface, DerivativeInspectionInterface {
/**
* Gets the tax number type label.
*
* @return string
* The tax number type label.
*/
public function getLabel();
/**
* Gets the supported countries.
*
* @return string[]
* A list of country codes.
*/
public function getCountries();
/**
* Gets the tax number examples.
*
* @return string[]
* The examples.
*/
public function getExamples();
/**
* Gets the tax number examples, formatted for display.
*
* @return string
* The formatted examples.
*/
public function getFormattedExamples();
/**
* Canonicalizes the given tax number.
*
* @param string $tax_number
* The tax number.
*
* @return string
* The canonicalized tax number.
*/
public function canonicalize($tax_number);
/**
* Validates the given tax number.
*
* @param string $tax_number
* The tax number.
*
* @return bool
* TRUE if the given tax number if valid, FALSE otherwise.
*/
public function validate($tax_number);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DerivativeInspectionInterface:: |
public | function | Gets the base_plugin_id of the plugin instance. | 1 |
DerivativeInspectionInterface:: |
public | function | Gets the derivative_id of the plugin instance. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
TaxNumberTypeInterface:: |
public | function | Canonicalizes the given tax number. | 1 |
TaxNumberTypeInterface:: |
public | function | Gets the supported countries. | 1 |
TaxNumberTypeInterface:: |
public | function | Gets the tax number examples. | 1 |
TaxNumberTypeInterface:: |
public | function | Gets the tax number examples, formatted for display. | 1 |
TaxNumberTypeInterface:: |
public | function | Gets the tax number type label. | 1 |
TaxNumberTypeInterface:: |
public | function | Validates the given tax number. | 3 |