[303fae2] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * |
---|
| 5 | * Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana |
---|
| 6 | * @file handler_field_ente_municipio.inc |
---|
| 7 | * Drupal part Module to install ente planificador module |
---|
| 8 | * Copyright 2011 Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana (CENDITEL) |
---|
| 9 | * |
---|
| 10 | * This program is free software; you can redistribute it and/or modify |
---|
| 11 | * it under the terms of the GNU General Public License as published by |
---|
| 12 | * the Free Software Foundation; either version 2 of the License, or |
---|
| 13 | * (at your option) any later version. |
---|
| 14 | * |
---|
| 15 | * This program is distributed in the hope that it will be useful, |
---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 18 | * GNU General Public License for more details. |
---|
| 19 | * |
---|
| 20 | * You should have received a copy of the GNU General Public License |
---|
| 21 | * along with this program; if not, write to the Free Software |
---|
| 22 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
| 23 | * |
---|
| 24 | * Probado con un servidor Apache 2.0, |
---|
| 25 | * Postgresql version 7.4.7 y 8.1 mysql 5.0.32 y PHP version 4.3.11 y 5.2.0-8 |
---|
| 26 | * |
---|
| 27 | * @author Cenditel Merida - Msc. Juan Vizcarrondo |
---|
| 28 | * Modificado por: Msc. Juan Vizcarrondo @date YYYY-MM-DD. |
---|
| 29 | * @date 2010-08-27 // (año-mes-dia) |
---|
| 30 | * @version 0.2 // (0.1) |
---|
| 31 | * |
---|
| 32 | */ |
---|
| 33 | |
---|
| 34 | /** |
---|
| 35 | * Mostrar el municipio en views. |
---|
| 36 | */ |
---|
| 37 | class handler_field_ente_municipio extends views_handler_field { |
---|
| 38 | function render($values) { |
---|
| 39 | if ($values->{$this->field_alias} < 1000) { |
---|
| 40 | $values->{$this->field_alias} = '0' . $values->{$this->field_alias}; |
---|
| 41 | } |
---|
| 42 | $municipio = ente_planificador_obtener_municipio($values->{$this->field_alias}); |
---|
| 43 | return $municipio->nombre; |
---|
| 44 | } |
---|
| 45 | } |
---|