<?php
/**
 * FormFieldType FieldType
 * 
 * @author Visual Media 
 */

namespace VisualM\FormBundle\Doctrine\FieldType;

use VisualM\ModelManagementBundle\Doctrine\ORM\FieldType\AbstractEnumType;

/**
 * FormFieldType FieldType
 * 
 * @author Visual Media 
 */
class FormFieldType extends AbstractEnumType
{
    
    const HIDDEN = 'hidden';
    const TEXT = 'text';
    const NUMBER = 'number';
    const PHONE = 'phone';
    const EMAIL = 'email';
    const DATE = 'date';
    const TEXTAREA = 'textarea';
    const SELECT = 'select';
    const SELECTLIST = 'selectlist';
    const CHECKBOXLIST = 'checkboxlist';
    const OPTIONLIST = 'optionlist';

    /**
     * Get available options
     * 
     * @return array Options
     */
    public static function getOptions() 
    {
        return array(
            self::HIDDEN,
            self::TEXT,
            self::NUMBER,
            self::PHONE,
            self::EMAIL,
            self::DATE,
            self::TEXTAREA,
            self::SELECT,
            self::SELECTLIST,
            self::CHECKBOXLIST,
            self::OPTIONLIST
        );
    }

    /**
     * {@inheritDoc}
     */
    public function getEnumOptions()
    {
        return self::getOptions();
    }
    
    /**
     * {@inheritDoc}
     */
    public function getName()
    {
        return 'form_field_type';
    }

}
