diff --git a/src/Facades/Timezonelist.php b/src/Facades/Timezonelist.php index f0114dc..e8612fb 100644 --- a/src/Facades/Timezonelist.php +++ b/src/Facades/Timezonelist.php @@ -10,7 +10,8 @@ * @method static \Jackiedo\Timezonelist\Timezonelist onlyGroups(array $groups=[]) Set the filter of the groups want to get. * @method static \Jackiedo\Timezonelist\Timezonelist excludeGroups(array $groups=[]) Set the filter of the groups do not want to get. * @method static \Jackiedo\Timezonelist\Timezonelist splitGroup(bool $status=true) Decide whether to split group or not. - * @method statis \Jackiedo\Timezonelist\Timezonelist showOffset(bool $status=true) Decide whether to show the offset or not. + * @method static \Jackiedo\Timezonelist\Timezonelist showOffset(bool $status=true) Decide whether to show the offset or not. + * @method static \Jackiedo\Timezonelist\Timezonelist setGeneralTimezones(array $timezones=[]) Sets the timezones available to show as general timezones. * @method static \Jackiedo\Timezonelist\Timezonelist reset() Return new static to reset all config. * @method static string toSelectBox(string $name, null|string $selected=null, null|array|string $attrs=null, bool $htmlencode=true) Create a select box of timezones. * @method static string create(string $name, null|string $selected=null, null|array|string $attrs=null, bool $htmlencode=true) Alias of the `toSelectBox()` method. diff --git a/src/Timezonelist.php b/src/Timezonelist.php index f1c4821..75815fd 100644 --- a/src/Timezonelist.php +++ b/src/Timezonelist.php @@ -367,6 +367,20 @@ protected function loadContinents() }, ARRAY_FILTER_USE_KEY); } + /** + * Sets the timezones available to show as general timezones. + * + * @param array $timezones + * + * @return $this + */ + protected function setGeneralTimezones(array $timezones) + { + $this->generalTimezones = $timezones; + + return $this; + } + /** * Format to display timezones. *