FormWidgetInterface
last analyzed

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 48
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
buildForm() 0 1 ?
bindRequest() 0 1 ?
persist() 0 1 ?
getFormErrors() 0 1 ?
getIdentifier() 0 1 ?
setIdentifier() 0 1 ?
getTemplate() 0 1 ?
getExtraParams() 0 1 ?
1
<?php
2
3
namespace Kunstmaan\AdminBundle\Helper\FormWidgets;
4
5
use Doctrine\ORM\EntityManager;
6
use Symfony\Component\Form\FormBuilderInterface;
7
use Symfony\Component\Form\FormView;
8
use Symfony\Component\HttpFoundation\Request;
9
10
/**
11
 * A tab can be added to the TabPane and show fields or other information of a certain entity
12
 */
13
interface FormWidgetInterface
14
{
15
    /**
16
     * @param FormBuilderInterface $builder The form builder
17
     */
18
    public function buildForm(FormBuilderInterface $builder);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
19
20
    /**
21
     * @param Request $request
22
     */
23
    public function bindRequest(Request $request);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
24
25
    /**
26
     * @param EntityManager $em The entity manager
27
     */
28
    public function persist(EntityManager $em);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
29
30
    /**
31
     * @param FormView $formView
32
     *
33
     * @return array
34
     */
35
    public function getFormErrors(FormView $formView);
36
37
    /**
38
     * @return string
39
     */
40
    public function getIdentifier();
41
42
    /**
43
     * @param string $identifier
44
     *
45
     * @return TabInterface
46
     */
47
    public function setIdentifier($identifier);
48
49
    /**
50
     * @return string
51
     */
52
    public function getTemplate();
53
54
    /**
55
     * @param Request $request
56
     *
57
     * @return array
58
     */
59
    public function getExtraParams(Request $request);
60
}
61