API reference / Quittio \ Core \ Enums
ItemClassificationScheme
string-backed enum in quittio/core · uses HasLabel
Quittio\Core\Enums\ItemClassificationScheme · Source
Item classification scheme (BT-158-1), UNTDID 7143 subset. Further codes can be used as RawCode.
Cases#
| Case | Value | Description |
|---|---|---|
HarmonisedSystem | 'HS' | |
Unspsc | 'TST' | |
CustomsArticleNumber | 'CV' | |
NationalProductGroup | 'GN' | |
Isbn | 'IB' | |
ProductServiceId | 'MP' | |
MutuallyDefined | 'ZZZ' |
Methods#
| Method | Description |
|---|---|
::isValidCode() | Whether a raw code value is valid according to the official code list. |
->label() | Translated label of the code in $locale (null: the translator's locale), e.g. "Stunde" for HUR; the code itself when neither $locale nor English has a label. |
::labelGroup() | The labels of these codes are under "item_classification" in resources/lang/{locale}/codes.php (see label()). |
isValidCode()#
public static function isValidCode(string $code): boolWhether a raw code value is valid according to the official code list.
| Parameter | Type | Description |
|---|---|---|
$code | string |
- Returns
bool
label()#
public function label(?string $locale = null): stringTranslated label of the code in $locale (null: the translator's locale), e.g. "Stunde" for HUR; the code itself when neither $locale nor English has a label.
| Parameter | Type | Description |
|---|---|---|
$locale | ?string = null |
- Returns
string
labelGroup()#
public static function labelGroup(): stringThe labels of these codes are under "item_classification" in resources/lang/{locale}/codes.php (see label()).
- Returns
string