PHP Classes

File: src/Renderer/Field/TextAreaRender.php

Recommend this page to a friend!
  Classes of Derek McLean   HTML Forms   src/Renderer/Field/TextAreaRender.php   Download  
File: src/Renderer/Field/TextAreaRender.php
Role: Class source
Content type: text/plain
Description: Class source
Class: HTML Forms
Generate and validate submitted HTML forms
Author: By
Last change:
Date: 6 years ago
Size: 652 bytes
 

Contents

Class file image Download
<?php
/**
 * User: delboy1978uk
 * Date: 04/12/2016
 * Time: 21:08
 */

namespace Del\Form\Renderer\Field;

use
Del\Form\Field\FieldInterface;
use
DOMElement;

class
TextAreaRender extends AbstractFieldRender implements FieldRendererInterface
{
   
/**
     * @param FieldInterface $field
     * @param DOMElement $element
     * @return DOMElement
     */
   
public function renderBlock(FieldInterface $field, DOMElement $element)
    {
       
$element->removeAttribute('type');
       
$element->removeAttribute('value');
       
$text = $this->createText($field->getValue());
       
$element->appendChild($text);
        return
$element;
    }

}