<?php
namespace AdminBundle\Form\Type;


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

class LanguageFormType extends AbstractType {

    public function buildForm(FormBuilderInterface $builder, array $options) {
        $builder->add('languages', 'entity', array(
            'class' => 'AdminBundle:Language',
            'choice_label' => 'label'
            )
        );
    }

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

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

}