MediaWiki master
TimezoneFilter.php
Go to the documentation of this file.
1<?php
21namespace MediaWiki\Preferences;
22
24
25class TimezoneFilter implements Filter {
26
30 public function filterForForm( $value ) {
31 return $value;
32 }
33
37 public function filterFromForm( $tz ) {
38 return ( new UserTimeCorrection( $tz ) )->toString();
39 }
40}
Utility class to parse the TimeCorrection string value.
Base interface for user preference filters that work as a middleware between storage and interface.
Definition Filter.php:27