weather_handler_utc_offset.inc in Weather 7.2
Same filename and directory in other branches
Views handler for weather module.
Copyright © 2013-2015 Dr. Tobias Quathamer <t.quathamer@mailbox.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
File
views_handlers/weather_handler_utc_offset.incView source
<?php
/**
* @file
* Views handler for weather module.
*
* Copyright © 2013-2015 Dr. Tobias Quathamer <t.quathamer@mailbox.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* Field handler to render UTC offset.
*/
class weather_handler_utc_offset extends views_handler_field_numeric {
/**
* Render UTC offset.
*/
public function render($values) {
if (is_null($values->{$this->field_alias})) {
return;
}
return $values->{$this->field_alias};
}
}
Classes
Name | Description |
---|---|
weather_handler_utc_offset | Field handler to render UTC offset. |