| Code Coverage | ||||||||||
| Lines | Functions and Methods | Classes and Traits | ||||||||
| Total |  | 0.00% | 0 / 6 |  | 0.00% | 0 / 1 | CRAP |  | 0.00% | 0 / 1 | 
| tao_helpers_form_elements_xhtml_ReadonlyLiteral |  | 0.00% | 0 / 6 |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 1 | 
| render |  | 0.00% | 0 / 6 |  | 0.00% | 0 / 1 | 2 | |||
| 1 | <?php | 
| 2 | |
| 3 | /** | 
| 4 | * This program is free software; you can redistribute it and/or | 
| 5 | * modify it under the terms of the GNU General Public License | 
| 6 | * as published by the Free Software Foundation; under version 2 | 
| 7 | * of the License (non-upgradable). | 
| 8 | * | 
| 9 | * This program is distributed in the hope that it will be useful, | 
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 
| 12 | * GNU General Public License for more details. | 
| 13 | * | 
| 14 | * You should have received a copy of the GNU General Public License | 
| 15 | * along with this program; if not, write to the Free Software | 
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 
| 17 | * | 
| 18 | * Copyright (c) 2017 (original work) Open Assessment Technologies SA; | 
| 19 | * | 
| 20 | * | 
| 21 | */ | 
| 22 | |
| 23 | use oat\tao\helpers\form\elements\xhtml\XhtmlRenderingTrait; | 
| 24 | |
| 25 | /** | 
| 26 | * Class tao_helpers_form_elements_xhtml_ReadonlyLiteral | 
| 27 | */ | 
| 28 | class tao_helpers_form_elements_xhtml_ReadonlyLiteral extends tao_helpers_form_elements_ReadonlyLiteral | 
| 29 | { | 
| 30 | use XhtmlRenderingTrait; | 
| 31 | |
| 32 | /** | 
| 33 | * @return string | 
| 34 | */ | 
| 35 | public function render() | 
| 36 | { | 
| 37 | $returnValue = $this->renderLabel(); | 
| 38 | $returnValue .= "<input type='text' readonly='readonly' disabled='disabled' name='{$this->name}' " | 
| 39 | . "id='{$this->name}' data-testid='{$this->getDescription()}' "; | 
| 40 | $returnValue .= $this->renderAttributes(); | 
| 41 | $returnValue .= ' value="' . _dh($this->value) . '" />'; | 
| 42 | return (string) $returnValue; | 
| 43 | } | 
| 44 | } |