Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Facades/Timezonelist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 14 additions & 0 deletions src/Timezonelist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down