Common/Model/Units.php
static function getSymbol($unit)
    {
        switch ($unit) {
            case static::PIECE:
                return 'pcs';

            // Length
            case static::METER:
                return 'm';
            case static::CENTIMETER:
                return 'cm';
            case static::MILLIMETER:
                return 'mm';
            case static::INCH:
                return 'in';
            case static::FOOT:
                return 'ft';

            // Weight
            case static::KILOGRAM:
                return 'kg';
            case static::GRAM:
                return 'g';

            // Volume
            case static::CUBIC_METER:
                return 'm³';
            case static::LITER:
                return 'L';
            case static::MILLILITER:
                return 'mL';

            // Duration
            case static::DAY:
                return 'days';
            case static::HOUR:
                return 'hours';
            case static::MINUTE:
                return 'minutes';
            case static::SECOND:
                return 's';

            default:
                throw new InvalidArgumentException("Invalid unit '$unit'.");
        }
    }
static function getSymbol($unit)
    {
        switch ($unit) {
            case static::PIECE:
                return 'pcs';

            // Length
            case static::METER:
                return 'm';
            case static::CENTIMETER:
                return 'cm';
            case static::MILLIMETER:
                return 'mm';
            case static::INCH:
                return 'in';
            case static::FOOT:
                return 'ft';

            // Weight
            case static::KILOGRAM:
                return 'kg';
            case static::GRAM:
                return 'g';

            // Volume
            case static::CUBIC_METER:
                return 'm³';
            case static::LITER:
                return 'L';
            case static::MILLILITER:
                return 'mL';

            // Duration
            case static::DAY:
                return 'days';
            case static::HOUR:
                return 'hours';
            case static::MINUTE:
                return 'minutes';
            case static::SECOND:
                return 's';

            default:
                throw new InvalidArgumentException("Invalid unit '$unit'.");
        }
    }
Returns the symbol for the given unit.

@param string $unit

@return int