interface TaxNumberItemInterface in Commerce Core 8.2
Defines the interface for tax number field items.
Hierarchy
- interface \Drupal\Core\TypedData\TypedDataInterface
- interface \Drupal\Core\TypedData\TraversableTypedDataInterface extends \Drupal\Core\TypedData\Traversable
- interface \Drupal\Core\TypedData\ComplexDataInterface
- interface \Drupal\Core\Field\FieldItemInterface
- interface \Drupal\commerce_tax\Plugin\Field\FieldType\TaxNumberItemInterface
- interface \Drupal\Core\Field\FieldItemInterface
- interface \Drupal\Core\TypedData\ComplexDataInterface
- interface \Drupal\Core\TypedData\TraversableTypedDataInterface extends \Drupal\Core\TypedData\Traversable
Expanded class hierarchy of TaxNumberItemInterface
All classes that implement TaxNumberItemInterface
1 file declares its use of TaxNumberItemInterface
- TaxNumberController.php in modules/
tax/ src/ Controller/ TaxNumberController.php
File
- modules/
tax/ src/ Plugin/ Field/ FieldType/ TaxNumberItemInterface.php, line 11
Namespace
Drupal\commerce_tax\Plugin\Field\FieldTypeView source
interface TaxNumberItemInterface extends FieldItemInterface {
/**
* Applies the given verification result.
*
* Ensures each portion of the result is stored in the field.
*
* @param \Drupal\commerce_tax\Plugin\Commerce\TaxNumberType\VerificationResult $result
* The verification result.
*
* @return $this
*/
public function applyVerificationResult(VerificationResult $result);
/**
* Checks whether the current value can be used for tax calculation.
*
* Confirms that:
* - The type is correct.
* - The number is not empty.
* - The number has been verified, or that unverified numbers are
* allowed when hen the verification web service is unavailable.
* This check is skipped if the type does not support verification.
*
* @param string $expected_type
* The expected tax number type.
*
* @return bool
* TRUE if the current value can be used, FALSE otherwise.
*/
public function checkValue($expected_type);
/**
* Gets the allowed countries.
*
* Tax numbers will be collected only for these countries.
*
* @return string[]
* A list of country codes.
*/
public function getAllowedCountries();
/**
* Gets the allowed tax number types.
*
* Determined based on the allowed countries.
*
* @return string[]
* A list of plugin IDs.
*/
public function getAllowedTypes();
/**
* Gets the tax number type plugin.
*
* @return \Drupal\commerce_tax\Plugin\Commerce\TaxNumberType\TaxNumberTypeInterface
* The tax number type plugin.
*/
public function getTypePlugin();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ComplexDataInterface:: |
public | function | Gets a property object. | 2 |
ComplexDataInterface:: |
public | function |
Gets the data definition. Overrides TypedDataInterface:: |
|
ComplexDataInterface:: |
public | function | Gets an array of property objects. | 3 |
ComplexDataInterface:: |
public | function | Determines whether the data structure is empty. | 2 |
ComplexDataInterface:: |
public | function | Sets a property value. | 3 |
ComplexDataInterface:: |
public | function | Returns an array of all property values. | 2 |
FieldItemInterface:: |
public static | function | Calculates dependencies for field items. | 1 |
FieldItemInterface:: |
public static | function | Calculates dependencies for field items on the storage level. | 1 |
FieldItemInterface:: |
public static | function | Defines the field-level settings for this plugin. | 1 |
FieldItemInterface:: |
public static | function | Defines the storage-level settings for this plugin. | 1 |
FieldItemInterface:: |
public | function | Defines custom delete behavior for field values. | 1 |
FieldItemInterface:: |
public | function | Defines custom revision delete behavior for field values. | 1 |
FieldItemInterface:: |
public | function | Returns a form for the field-level settings. | 1 |
FieldItemInterface:: |
public static | function | Returns a settings array in the field type's canonical representation. | 1 |
FieldItemInterface:: |
public static | function | Returns a settings array that can be stored as a configuration value. | 1 |
FieldItemInterface:: |
public static | function | Generates placeholder field values. | 1 |
FieldItemInterface:: |
public | function | Gets the entity that field belongs to. | 1 |
FieldItemInterface:: |
public | function | Gets the field definition. | 1 |
FieldItemInterface:: |
public | function | Gets the langcode of the field values held in the object. | 1 |
FieldItemInterface:: |
public static | function | Returns the name of the main property, if any. | 1 |
FieldItemInterface:: |
public static | function | Informs the plugin that a dependency of the field will be deleted. | 1 |
FieldItemInterface:: |
public | function | Defines custom post-save behavior for field values. | 1 |
FieldItemInterface:: |
public | function | Defines custom presave behavior for field values. | 1 |
FieldItemInterface:: |
public static | function | Defines field item properties. | 28 |
FieldItemInterface:: |
public static | function | Returns the schema for the field. | 31 |
FieldItemInterface:: |
public | function | Returns a form for the storage-level settings. | 1 |
FieldItemInterface:: |
public static | function | Returns a settings array in the field type's canonical representation. | 1 |
FieldItemInterface:: |
public static | function | Returns a settings array that can be stored as a configuration value. | 1 |
FieldItemInterface:: |
public | function | Returns a renderable array for a single field item. | 1 |
FieldItemInterface:: |
public | function | Magic method: Gets a property value. | 1 |
FieldItemInterface:: |
public | function | Magic method: Determines whether a property is set. | 1 |
FieldItemInterface:: |
public | function | Magic method: Sets a property value. | 1 |
FieldItemInterface:: |
public | function | Magic method: Unsets a property. | 1 |
TaxNumberItemInterface:: |
public | function | Applies the given verification result. | 1 |
TaxNumberItemInterface:: |
public | function | Checks whether the current value can be used for tax calculation. | 1 |
TaxNumberItemInterface:: |
public | function | Gets the allowed countries. | 1 |
TaxNumberItemInterface:: |
public | function | Gets the allowed tax number types. | 1 |
TaxNumberItemInterface:: |
public | function | Gets the tax number type plugin. | 1 |
TraversableTypedDataInterface:: |
public | function | React to changes to a child property or item. | 4 |
TypedDataInterface:: |
public | function | Applies the default value. | 1 |
TypedDataInterface:: |
public static | function | Constructs a TypedData object given its definition and context. | 1 |
TypedDataInterface:: |
public | function | Gets a list of validation constraints. | 1 |
TypedDataInterface:: |
public | function | Returns the name of a property or item. | 1 |
TypedDataInterface:: |
public | function | Returns the parent data structure; i.e. either complex data or a list. | 1 |
TypedDataInterface:: |
public | function | Returns the property path of the data. | 1 |
TypedDataInterface:: |
public | function | Returns the root of the typed data tree. | 1 |
TypedDataInterface:: |
public | function | Returns a string representation of the data. | 1 |
TypedDataInterface:: |
public | function | Gets the data value. | 1 |
TypedDataInterface:: |
public | function | Sets the context of a property or item via a context aware parent. | 1 |
TypedDataInterface:: |
public | function | Sets the data value. | 1 |
TypedDataInterface:: |
public | function | Validates the currently set data value. | 1 |