PHP Classes

File: src/Field/Submit.php

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

Contents

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

namespace Del\Form\Field;

class
Submit extends FieldAbstract
{
   
/**
     * @return string
     */
   
public function getTag()
    {
        return
'input';
    }

    public function
init()
    {
       
$this->setAttribute('type', 'submit');
    }

    public function
__construct($name, $value = null)
    {
       
$value = is_null($value) ? $name : $value;
       
parent::__construct($name, $value);
       
$this->setClass('btn btn-primary');
    }
}