Source of file DeviceType.php

Size: 0,849 Bytes - Last Modified: 2014-10-15T13:07:14+03:00

/Users/mcfedr/dev/awspushbundle/src/Mcfedr/AwsPushBundle/Form/DeviceType.php

123456789101112131415161718192021222324252627282930313233343536373839
<?php

namespace Mcfedr\AwsPushBundle\Form;


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

class DeviceType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('deviceId')
            ->add('platform');
    }

    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults([
            'data_class' => 'Mcfedr\AwsPushBundle\Form\Model\Device'
        ]);
    }

    /**
     * Returns the name of this type.
     *
     * @return string The name of this type
     */
    public function getName()
    {
        return 'device';
    }
}