forked from FriendsOfSymfony/FOSMessageBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NewThreadMultipleMessageFormType.php
48 lines (43 loc) · 1.44 KB
/
NewThreadMultipleMessageFormType.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
namespace FOS\MessageBundle\FormType;
use FOS\MessageBundle\Util\LegacyFormHelper;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
/**
* Message form type for starting a new conversation with multiple recipients.
*
* @author Łukasz Pospiech <[email protected]>
*/
class NewThreadMultipleMessageFormType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('recipients', LegacyFormHelper::getType('FOS\MessageBundle\FormType\RecipientsType'), array(
'label' => 'recipients',
'translation_domain' => 'FOSMessageBundle',
))
->add('subject', LegacyFormHelper::getType('Symfony\Component\Form\Extension\Core\Type\TextType'), array(
'label' => 'subject',
'translation_domain' => 'FOSMessageBundle',
))
->add('body', LegacyFormHelper::getType('Symfony\Component\Form\Extension\Core\Type\TextareaType'), array(
'label' => 'body',
'translation_domain' => 'FOSMessageBundle',
));
}
/**
* {@inheritdoc}
*/
public function getBlockPrefix()
{
return 'fos_message_new_multiperson_thread';
}
/**
* @deprecated To remove when supporting only Symfony 3
*/
public function getName()
{
return $this->getBlockPrefix();
}
}