-
Notifications
You must be signed in to change notification settings - Fork 189
/
FormWidgetInterface.php
54 lines (44 loc) · 1.17 KB
/
FormWidgetInterface.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
49
50
51
52
53
54
<?php
namespace Kunstmaan\AdminBundle\Helper\FormWidgets;
use Doctrine\ORM\EntityManager;
use Kunstmaan\AdminBundle\Helper\FormWidgets\Tabs\TabInterface;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\HttpFoundation\Request;
/**
* A tab can be added to the TabPane and show fields or other information of a certain entity
*/
interface FormWidgetInterface
{
/**
* @param FormBuilderInterface $builder The form builder
*/
public function buildForm(FormBuilderInterface $builder);
public function bindRequest(Request $request);
/**
* @param EntityManager $em The entity manager
*/
public function persist(EntityManager $em);
/**
* @return array
*/
public function getFormErrors(FormView $formView);
/**
* @return string
*/
public function getIdentifier();
/**
* @param string $identifier
*
* @return TabInterface
*/
public function setIdentifier($identifier);
/**
* @return string
*/
public function getTemplate();
/**
* @return array
*/
public function getExtraParams(Request $request);
}