]> Raphaƫl G. Git Repositories - blogbundle/blob - Form/ArticleType.php
Add rapsys blog route config
[blogbundle] / Form / ArticleType.php
1 <?php
2
3 namespace Rapsys\BlogBundle\Form;
4
5 use Symfony\Component\Form\AbstractType;
6 use Symfony\Component\Form\FormBuilderInterface;
7 use Symfony\Component\OptionsResolver\OptionsResolver;
8
9 class ArticleType extends AbstractType
10 {
11 /**
12 * {@inheritdoc}
13 */
14 public function buildForm(FormBuilderInterface $builder, array $options)
15 {
16 $builder->add('created')->add('updated')->add('site')->add('author')->add('keywords');
17 }
18
19 /**
20 * {@inheritdoc}
21 */
22 public function configureOptions(OptionsResolver $resolver)
23 {
24 $resolver->setDefaults(array(
25 'data_class' => 'Rapsys\BlogBundle\Entity\Article'
26 ));
27 }
28
29 /**
30 * {@inheritdoc}
31 */
32 public function getBlockPrefix()
33 {
34 return 'rapsys_blogbundle_article';
35 }
36 }