<?php

namespace AdminBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class PictureFormType extends AbstractType {

    public function buildForm(FormBuilderInterface $builder, array $options) {
        $builder->add('label', 'text', array(
            'label' => 'Name',
            'required' => true
        ));
        $builder->add('file', 'file', array(
            'label' => 'Image',
            'required' => true
        ));
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => "AdminBundle\Form\PictureForm"
        ));
    }

    public function getName()
    {
        return 'admin_picture_form';
    }

}