Last active
December 10, 2015 03:08
-
-
Save yesez/4372276 to your computer and use it in GitHub Desktop.
MensajeType
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace UCA\SGExaBundle\Form; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\Form\AbstractType; | |
class MensajeType extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
$builder | |
->add('titulo') | |
->add('destinatarios', 'genemu_jqueryselect2_entity', array( | |
'class' => 'UCA\SGExaBundle\Entity\Usuario', | |
'property' => 'email', | |
'multiple' => true, | |
)) | |
->add('cuerpo', 'textarea', array( | |
'attr' => array( | |
'class' => 'tinymce', | |
'data-theme' => 'medium' | |
) | |
)) | |
->add('plantilla', 'text', array( | |
'required' => false, | |
)) | |
->add('plantillas', 'entity', array( | |
'class' => 'UCA\SGExaBundle\Entity\Plantilla', | |
'property' => 'nombre', | |
'expanded' => true, | |
'required' => false, | |
)) | |
; | |
} | |
public function getDefaultOptions(array $options) | |
{ | |
return array( | |
'data_class' => 'UCA\SGExaBundle\Entity\Mensaje', | |
); | |
} | |
public function getName(){ | |
return "CreacionMensaje"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment