Swat/SwatTimeZoneEntry.php
public function process()
    {
        parent::process();

        $areas_flydown = $this->getCompositeWidget('areas_flydown');
        $regions_flydown = $this->getCompositeWidget('regions_flydown');

        if ($areas_flydown->value === 'UTC') {
            $this->value = 'UTC';
        } elseif (
            $areas_flydown->value === null ||
            $regions_flydown->value === null
        ) {
            $this->value = null;
        } else {
            $this->value =
                $areas_flydown->value . '/' . $regions_flydown->value;
        }

        if (!$this->required && $this->value === null && $this->isSensitive()) {
            return;
        } elseif ($this->value === null) {
            $message = Swat::_('The %s field is required.');
            $this->addMessage(new SwatMessage($message, 'error'));
        } else {
            try {
                $time_zone = new DateTimeZone($this->value);
            } catch (Exception $e) {
                $message = Swat::_('The %s field is an invalid time zone.');
                $this->addMessage(new SwatMessage($message, 'error'));
            }
        }
    }
public function process()
    {
        parent::process();

        $areas_flydown = $this->getCompositeWidget('areas_flydown');
        $regions_flydown = $this->getCompositeWidget('regions_flydown');

        if ($areas_flydown->value === 'UTC') {
            $this->value = 'UTC';
        } elseif (
            $areas_flydown->value === null ||
            $regions_flydown->value === null
        ) {
            $this->value = null;
        } else {
            $this->value =
                $areas_flydown->value . '/' . $regions_flydown->value;
        }

        if (!$this->required && $this->value === null && $this->isSensitive()) {
            return;
        } elseif ($this->value === null) {
            $message = Swat::_('The %s field is required.');
            $this->addMessage(new SwatMessage($message, 'error'));
        } else {
            try {
                $time_zone = new DateTimeZone($this->value);
            } catch (Exception $e) {
                $message = Swat::_('The %s field is an invalid time zone.');
                $this->addMessage(new SwatMessage($message, 'error'));
            }
        }
    }
public function process ( ) { parent :: process ( ) ; $ areas_flydown = $ this -> getCompositeWidget ( 'areas_flydown' ) ; $ regions_flydown = $ this -> getCompositeWidget ( 'regions_flydown' ) ; if ( $ areas_flydown -> value === 'UTC' ) { $ this -> value = 'UTC' ; } elseif ( $ areas_flydown -> value === null || $ regions_flydown -> value === null ) { $ this -> value = null ; } else { $ this -> value = $ areas_flydown -> value . '/' . $ regions_flydown -> value ; } if ( ! $ this -> required && $ this -> value === null && $ this -> isSensitive ( ) ) { return ; } elseif ( $ this -> value === null ) { $ message = Swat :: _ ( 'The %s field is required.' ) ; $ this -> addMessage ( new SwatMessage ( $ message , 'error' ) ) ; } else { try { $ time_zone = new DateTimeZone ( $ this -> value ) ; } catch ( Exception $ e ) { $ message = Swat :: _ ( 'The %s field is an invalid time zone.' ) ; $ this -> addMessage ( new SwatMessage ( $ message , 'error' ) ) ; } } }
Processes this time zone entry widget

If any validation type errors occur, an error message is attached to
this entry widget.
Processes this time zone entry widget