mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-05-07 20:32:26 +00:00
37 lines
814 B
PHP
37 lines
814 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Enums;
|
|
|
|
use Datomatic\LaravelEnumHelper\LaravelEnumHelper;
|
|
|
|
enum CurrencyFormat: string
|
|
{
|
|
use LaravelEnumHelper;
|
|
|
|
case ISOCodeBeforeWithSpace = 'iso-code-before-with-space';
|
|
case ISOCodeAfterWithSpace = 'iso-code-after-with-space';
|
|
|
|
case SymbolBefore = 'symbol-before';
|
|
|
|
case SymbolAfter = 'symbol-after';
|
|
|
|
case SymbolBeforeWithSpace = 'symbol-before-with-space';
|
|
|
|
case SymbolAfterWithSpace = 'symbol-after-with-space';
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
public static function toSelectArray(): array
|
|
{
|
|
$selectArray = [];
|
|
foreach (self::values() as $value) {
|
|
$selectArray[(string) $value] = (string) __('enum.currency_format.'.$value);
|
|
}
|
|
|
|
return $selectArray;
|
|
}
|
|
}
|