-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from TappNetwork/add_options_to_show_by_country…
…_or_region Add options to list timezones by country or by region
- Loading branch information
Showing
3 changed files
with
106 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Tapp\FilamentTimezoneField\Enums; | ||
|
||
use DateTimeZone; | ||
use Filament\Support\Contracts\HasLabel; | ||
|
||
enum Region: int implements HasLabel | ||
{ | ||
case Africa = DateTimeZone::AFRICA; | ||
case America = DateTimeZone::AMERICA; | ||
case Antarctica = DateTimeZone::ANTARCTICA; | ||
case Arctic = DateTimeZone::ARCTIC; | ||
case Asia = DateTimeZone::ASIA; | ||
case Atlantic = DateTimeZone::ATLANTIC; | ||
case Australia = DateTimeZone::AUSTRALIA; | ||
case Europe = DateTimeZone::EUROPE; | ||
case Indian = DateTimeZone::INDIAN; | ||
case Pacific = DateTimeZone::PACIFIC; | ||
|
||
public function getLabel(): ?string | ||
{ | ||
return $this->name; | ||
} | ||
} |