<?php 

namespace PLL\SocialBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Translation\TranslatorInterface;

class PostType extends AbstractType
{
	public function buildForm(FormBuilderInterface $builder, array $options)
	{
		$builder
			->add('content', TextareaType::class, array(
			    'required'    		 => true,
				'label' 			 => false,
			))
            ->add('save', SubmitType::class, array(
            	'label'	=> 'timelinepost.label.post',
                'translation_domain' => 'forms',
            	'attr'  => array(
            		'class' => 'post-btn w3-btn w3-theme',
            	)
            ))
		;
	}

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'PLL\SocialBundle\Entity\Post'
        ));
    }
}

 ?>