1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace AppBundle\Controller; |
4
|
|
|
|
5
|
|
|
use Devmachine\Bundle\FormBundle\Form\Type\DateType; |
6
|
|
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
|
|
|
7
|
|
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
|
|
|
|
8
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
9
|
|
|
|
10
|
|
|
class DateController extends Controller |
11
|
|
|
{ |
12
|
|
|
use ServicesTrait; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* @Route("/", name="date") |
16
|
|
|
* @Template("AppBundle::date.html.twig") |
17
|
|
|
*/ |
18
|
|
|
public function indexAction() |
19
|
|
|
{ |
20
|
|
|
return [ |
21
|
|
|
'default' => $this->defaultForm()->createView(), |
22
|
|
|
'inline' => $this->inlineForm()->createView(), |
23
|
|
|
'addon' => $this->addonForm()->createView(), |
24
|
|
|
'title' => 'Bootstrap date', |
25
|
|
|
'nav' => 'date', |
26
|
|
|
]; |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
private function defaultForm() |
30
|
|
|
{ |
31
|
|
|
return $this->createNamedBuilder('default') |
32
|
|
|
->add('date', DateType::class, [ |
33
|
|
|
'config' => [ |
34
|
|
|
'clearBtn' => true, |
35
|
|
|
'orientation' => 'top', |
36
|
|
|
'todayHighlight' => true, |
37
|
|
|
], |
38
|
|
|
'format' => 'dd/MM/y', |
39
|
|
|
]) |
40
|
|
|
->getForm() |
41
|
|
|
; |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
private function addonForm() |
45
|
|
|
{ |
46
|
|
|
return $this->createNamedBuilder('addon') |
47
|
|
|
->add('date', DateType::class, [ |
48
|
|
|
'input_addon' => true, |
49
|
|
|
'locale' => 'ru', |
50
|
|
|
]) |
51
|
|
|
->getForm() |
52
|
|
|
; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
private function inlineForm() |
56
|
|
|
{ |
57
|
|
|
return $this->createNamedBuilder('inline') |
58
|
|
|
->add('date', DateType::class, [ |
59
|
|
|
'inline' => true, |
60
|
|
|
]) |
61
|
|
|
->getForm() |
62
|
|
|
; |
63
|
|
|
} |
64
|
|
|
} |
65
|
|
|
|
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