class TimezoneTransformer implements DataTransformerInterface

Methods

__construct(array $timezones = null)

Create a new TimezoneTransformer

null|string
transform(string $timezone)

Take a timezone and put its value on the time and timezone fields, so the user can see it

string
reverseTransform(array $data)

Return a timezone ready to use internally

Details

at line line 20
__construct(array $timezones = null)

Create a new TimezoneTransformer

Parameters

array $timezones An array of timezones, defaults to TimezoneType::getTimezones()

at line line 32
null|string transform(string $timezone)

Take a timezone and put its value on the time and timezone fields, so the user can see it

Parameters

string $timezone The timezone

Return Value

null|string

at line line 63
string reverseTransform(array $data)

Return a timezone ready to use internally

Parameters

array $data Symfony's form data

Return Value

string