|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace PiouPiou\RibsAdminBundle\Form; |
|
4
|
|
|
|
|
5
|
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
|
|
|
|
6
|
|
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType; |
|
|
|
|
|
|
7
|
|
|
use Symfony\Component\Form\AbstractType; |
|
8
|
|
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType; |
|
9
|
|
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType; |
|
10
|
|
|
use Symfony\Component\Form\Extension\Core\Type\TextareaType; |
|
11
|
|
|
use Symfony\Component\Form\Extension\Core\Type\TextType; |
|
12
|
|
|
use Symfony\Component\Form\FormBuilderInterface; |
|
13
|
|
|
use Symfony\Component\OptionsResolver\OptionsResolver; |
|
14
|
|
|
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; |
|
15
|
|
|
|
|
16
|
|
|
class Module extends AbstractType |
|
17
|
|
|
{ |
|
18
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options) |
|
19
|
|
|
{ |
|
20
|
|
|
$builder |
|
21
|
|
|
->add("title", TextType::class, [ |
|
22
|
|
|
"label" => "Name", |
|
23
|
|
|
"required" => true |
|
24
|
|
|
]) |
|
25
|
|
|
->add("packageName", TextType::class, [ |
|
26
|
|
|
"label" => "Package name", |
|
27
|
|
|
"required" => true, |
|
28
|
|
|
"disabled" => true |
|
29
|
|
|
]) |
|
30
|
|
|
->add("titleTag", TextType::class, [ |
|
31
|
|
|
"label" => "Title tag", |
|
32
|
|
|
"required" => true |
|
33
|
|
|
]) |
|
34
|
|
|
->add("descriptionTag", TextareaType::class, [ |
|
35
|
|
|
"label" => "Description tag", |
|
36
|
|
|
"required" => true, |
|
37
|
|
|
]) |
|
38
|
|
|
->add("url", TextType::class, [ |
|
39
|
|
|
"label" => "Url", |
|
40
|
|
|
"required" => true |
|
41
|
|
|
]) |
|
42
|
|
|
->add("urlAdmin", TextType::class, [ |
|
43
|
|
|
"label" => "Admin url", |
|
44
|
|
|
"required" => true |
|
45
|
|
|
]) |
|
46
|
|
|
->add("active", CheckboxType::class, [ |
|
47
|
|
|
"label" => "Enable module", |
|
48
|
|
|
"attr" => [ |
|
49
|
|
|
"class" => "ribs-checkbox switched cxs-2 no-pl" |
|
50
|
|
|
], |
|
51
|
|
|
"required" => false |
|
52
|
|
|
]) |
|
53
|
|
|
->add("displayed", CheckboxType::class, [ |
|
54
|
|
|
"label" => "Display module in navigation", |
|
55
|
|
|
"attr" => [ |
|
56
|
|
|
"class" => "ribs-checkbox switched cxs-2 no-pl" |
|
57
|
|
|
], |
|
58
|
|
|
"required" => false |
|
59
|
|
|
]) |
|
60
|
|
|
->add('submit', SubmitType::class, [ |
|
61
|
|
|
'label' => 'Validate', |
|
62
|
|
|
'attr' => [] |
|
63
|
|
|
]); |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
public function configureOptions(OptionsResolver $resolver) |
|
67
|
|
|
{ |
|
68
|
|
|
$resolver->setDefaults([ |
|
69
|
|
|
"data_class" => \PiouPiou\RibsAdminBundle\Entity\Module::class, |
|
70
|
|
|
]); |
|
71
|
|
|
} |
|
72
|
|
|
} |
|
73
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths