|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
-
- namespace domain\Config\Unit;
-
- use domain\_\AbstractDefinition;
-
- class UnitDefinition extends AbstractDefinition
- {
- const UNIT_PIECE = 'PIECE';
- const UNIT_G = 'g';
- const UNIT_KG = 'kg';
- const UNIT_ML = 'mL';
- const UNIT_L = 'L';
-
- const WORDING_UNIT = 'wording_unit';
- const WORDING = 'wording';
- const WORDING_SHORT = 'wording_short';
-
- public function getUnits(): array
- {
- return [
- 'piece' => [
- 'unit' => 'piece',
- 'wording_unit' => 'la pièce',
- 'wording' => 'pièce(s)',
- 'wording_short' => 'p.',
- 'coefficient' => 1
- ],
- 'g' => [
- 'ref_unit' => 'kg',
- 'unit' => 'g',
- 'wording_unit' => 'le g',
- 'wording' => 'g',
- 'wording_short' => 'g',
- 'coefficient' => 1000
- ],
- 'kg' => [
- 'unit' => 'kg',
- 'wording_unit' => 'le kg',
- 'wording' => 'kg',
- 'wording_short' => 'kg',
- 'coefficient' => 1
- ],
- 'mL' => [
- 'ref_unit' => 'L',
- 'unit' => 'mL',
- 'wording_unit' => 'le mL',
- 'wording' => 'mL',
- 'wording_short' => 'mL',
- 'coefficient' => 1000
- ],
- 'L' => [
- 'unit' => 'L',
- 'wording_unit' => 'le litre',
- 'wording' => 'L',
- 'wording_short' => 'L',
- 'coefficient' => 1
- ],
- ];
- }
-
- public function getEntityFqcn(): string
- {
- return '';
- }
- }
|