Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
14 / 14 |
| TTableRow | |
100.00% |
1 / 1 |
|
100.00% |
5 / 5 |
7 | |
100.00% |
14 / 14 |
| __construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
| addCell | |
100.00% |
1 / 1 |
1 | |
100.00% |
4 / 4 |
|||
| setVisible | |
100.00% |
1 / 1 |
2 | |
100.00% |
3 / 3 |
|||
| getVisible | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| show | |
100.00% |
1 / 1 |
2 | |
100.00% |
3 / 3 |
|||
| 1 | <?php |
| 2 | /* |
| 3 | * Formdin Framework |
| 4 | * Copyright (C) 2012 Ministério do Planejamento |
| 5 | * Criado por Luís Eugênio Barbosa |
| 6 | * Essa versão é um Fork https://github.com/bjverde/formDin |
| 7 | * |
| 8 | * ---------------------------------------------------------------------------- |
| 9 | * This file is part of Formdin Framework. |
| 10 | * |
| 11 | * Formdin Framework is free software; you can redistribute it and/or |
| 12 | * modify it under the terms of the GNU Lesser General Public License version 3 |
| 13 | * as published by the Free Software Foundation. |
| 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 Lesser General Public License version 3 |
| 21 | * along with this program; if not, see <http://www.gnu.org/licenses/> |
| 22 | * or write to the Free Software Foundation, Inc., 51 Franklin Street, |
| 23 | * Fifth Floor, Boston, MA 02110-1301, USA. |
| 24 | * ---------------------------------------------------------------------------- |
| 25 | * Este arquivo é parte do Framework Formdin. |
| 26 | * |
| 27 | * O Framework Formdin é um software livre; você pode redistribuí-lo e/ou |
| 28 | * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação |
| 29 | * do Software Livre (FSF). |
| 30 | * |
| 31 | * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA |
| 32 | * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou |
| 33 | * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português |
| 34 | * para maiores detalhes. |
| 35 | * |
| 36 | * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título |
| 37 | * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> |
| 38 | * ou escreva para a Fundação do Software Livre (FSF) Inc., |
| 39 | * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. |
| 40 | */ |
| 41 | class TTableRow extends TElement |
| 42 | { |
| 43 | private $visible; |
| 44 | public function __construct() |
| 45 | { |
| 46 | parent::__construct('tr'); |
| 47 | $this->setVisible(true); |
| 48 | } |
| 49 | //------------------------------------------------------------------ |
| 50 | public function addCell($value=null,$strId=null) |
| 51 | { |
| 52 | $cell = new TTableCell($value); |
| 53 | $cell->setId($strId); |
| 54 | parent::add($cell); |
| 55 | return $cell; |
| 56 | } |
| 57 | public function setVisible($boolNewValue=null) |
| 58 | { |
| 59 | $boolNewValue = is_null($boolNewValue) ? true :$boolNewValue; |
| 60 | $this->visible = $boolNewValue; |
| 61 | } |
| 62 | public function getVisible() |
| 63 | { |
| 64 | return $this->visible; |
| 65 | } |
| 66 | public function show($print=true) |
| 67 | { |
| 68 | if($this->getVisible()) { |
| 69 | return parent::show($print); |
| 70 | } |
| 71 | return null; |
| 72 | } |
| 73 | } |
| 74 | ?> |