PHP Classes
elePHPant
Icontem

File: src/Field/Select.php

Recommend this page to a friend!
  Classes of Derek McLean  >  HTML Forms  >  src/Field/Select.php  >  Download  
File: src/Field/Select.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: 1 year ago
Size: 534 bytes
 

Contents

Class file image Download
<?php
/**
 * User: delboy1978uk
 * Date: 05/12/2016
 * Time: 00:57
 */

namespace Del\Form\Field;

use
Del\Form\Renderer\Field\SelectRender;
use
Del\Form\Traits\HasOptionsTrait;

class
Select extends FieldAbstract
{
    use
HasOptionsTrait;

   
/**
     * @return string
     */
   
public function getTag()
    {
        return
'select';
    }

    public function
init()
    {
       
$this->setAttribute('type', 'text');
       
$this->setAttribute('class', 'form-control');
       
$this->setRenderer(new SelectRender());
    }
}