PHP Classes

File: src/Field/Radio.php

Recommend this page to a friend!
  Classes of Derek McLean   HTML Forms   src/Field/Radio.php   Download  
File: src/Field/Radio.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: 660 bytes
 

Contents

Class file image Download
<?php
/**
 * User: delboy1978uk
 * Date: 19/11/2016
 * Time: 21:37
 */

namespace Del\Form\Field;

use
Del\Form\Renderer\Field\RadioRender;
use
Del\Form\Traits\CanRenderInlineTrait;
use
Del\Form\Traits\HasOptionsTrait;

class
Radio extends FieldAbstract implements ArrayValueInterface
{
    use
CanRenderInlineTrait;
    use
HasOptionsTrait;

   
/**
     * We end up ignoring this during rendering Radios, see the renderer for info
     *
     * @return string
     */
   
public function getTag()
    {
        return
'div';
    }

    public function
init()
    {
       
$this->setRenderInline(false);
       
$this->setRenderer(new RadioRender());
    }
}