mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
27 lines
617 B
PHP
27 lines
617 B
PHP
<?php
|
|
|
|
namespace App\Filament;
|
|
|
|
trait OptionsTrait
|
|
{
|
|
private static array $matchTypes = ['dec' => 'dec', 'hex' => 'hex'];
|
|
|
|
private static array $yesOrNo = ['yes' => 'yes', 'no' => 'no'];
|
|
|
|
private static function getEnableDisableOptions($enableValue = 0, $disableValue = 1): array
|
|
{
|
|
return [
|
|
$enableValue => __('label.enabled'),
|
|
$disableValue => __('label.disabled'),
|
|
];
|
|
}
|
|
|
|
private static function getYesNoOptions($yesValue = 1, $noValue = 0): array
|
|
{
|
|
return [
|
|
$yesValue => 'Yes',
|
|
$noValue => 'No',
|
|
];
|
|
}
|
|
}
|